I'm getting this exception thrown sometimes, unfortunately I don't know the exact value that's getting passed to the parse method because the code is in a production environment. The calling code is pretty much:
According to the javadoc, parse() throws only ParseException yet strangely whatever argument is being passed to parse() is causing a NumberFormatException with the following message below.
Passing "" directly to parse() results in the appropriate ParseException: Exception in
thread "main" java.text.ParseException: Unparseable date: ""
However, I don't know how to replicate the exception below. Any ideas?
java.lang.NumberFormatException: For input
string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:344)
at java.lang.Long.parseLong(Long.java:381)
at java.text.DigitList.getLong(DigitList.java:150)
at java.text.DecimalFormat.parse(DecimalFormat.java:1067)
at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1381)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1159)
at java.text.DateFormat.parse(DateFormat.java:332)