summaryrefslogtreecommitdiff
path: root/java/text/SimpleDateFormat.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2015-06-19 16:04:59 +0100
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2015-06-19 16:04:59 +0100
commit6bc8d84e4b0527f680b78a9a0c808cda74d4933d (patch)
tree835056047b4bde36f8d67b1656fa8dab8f6e1c6d /java/text/SimpleDateFormat.java
parent591da8d224ab68474c4600d42fc74bafe974303a (diff)
downloadclasspath-6bc8d84e4b0527f680b78a9a0c808cda74d4933d.tar.gz
Mention PR66376.
2015-06-19 Andrew John Hughes <gnu_andrew@member.fsf.org> * NEWS: Mention PR66376.
Diffstat (limited to 'java/text/SimpleDateFormat.java')
-rw-r--r--java/text/SimpleDateFormat.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/java/text/SimpleDateFormat.java b/java/text/SimpleDateFormat.java
index 05fa4cf15..ba982c457 100644
--- a/java/text/SimpleDateFormat.java
+++ b/java/text/SimpleDateFormat.java
@@ -907,6 +907,7 @@ public class SimpleDateFormat extends DateFormat
for (; fmt_index < fmt_max; ++fmt_index)
{
char ch = pattern.charAt(fmt_index);
+ System.err.println("Handling pattern character " + ch);
if (ch == '\'')
{
if (fmt_index < fmt_max - 1
@@ -1099,6 +1100,7 @@ public class SimpleDateFormat extends DateFormat
}
break;
default:
+ System.err.println("Hit default case from " + ch + "; returning null");
pos.setErrorIndex(pos.getIndex());
return null;
}
@@ -1125,7 +1127,10 @@ public class SimpleDateFormat extends DateFormat
else
n = numberFormat.parse(dateStr, pos);
if (pos == null || ! (n instanceof Long))
- return null;
+ {
+ System.err.println("Number format parsing error; n = " + n + "; returning null");
+ return null;
+ }
value = n.intValue() + offset;
}
else if (set1 != null)
@@ -1160,6 +1165,7 @@ public class SimpleDateFormat extends DateFormat
}
if (!found)
{
+ System.err.println("!found; returning null");
pos.setErrorIndex(index);
return null;
}
@@ -1212,9 +1218,12 @@ public class SimpleDateFormat extends DateFormat
catch (IllegalArgumentException x)
{
pos.setErrorIndex(pos.getIndex());
+ System.err.println("Threw " + x + "; returning null.");
+ System.err.println("Index: " + pos.getIndex());
+ x.printStackTrace();
return null;
}
- }
+ }
/**
* <p>