Description
Time.decode("12:34:56.789");
works,
Time.decode("12:34:56")
throws a NullPointerException at org.apache.pivot.util.Time.decode(Time.java:399)
I believe the problem is that matcher.groupCount() returns # of groups in pattern, not # of matched, so it always ==5; thus when no milliseconds passed, matcher.group(4) is null.
if (matcher.groupCount() == 5)
{ millisecond = Integer.parseInt(matcher.group(4).substring(1)); }else
{ millisecond = 0; }