summaryrefslogtreecommitdiff
path: root/java/text/SimpleDateFormat.java
diff options
context:
space:
mode:
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>