Bug 50830 - NPE in ISO8601DateFormat.hashCode and toString
Summary: NPE in ISO8601DateFormat.hashCode and toString
Status: NEW
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.2
Hardware: PC Windows XP
: P2 minor
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-25 09:30 UTC by 42td
Modified: 2011-02-25 09:30 UTC (History)
0 users



Attachments
Test main class which demonstrates the NPEs and ParseException. (573 bytes, application/octet-stream)
2011-02-25 09:30 UTC, 42td
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 42td 2011-02-25 09:30:53 UTC
Created attachment 26693 [details]
Test main class which demonstrates the NPEs and ParseException.

hashCode and toString of ISO8601DateFormat throw a NullPointerException, because the inherited field numberFormat is not initialized.

BTW, since it overrides parse(String, ParsePosition) to always return null, it should probably do the same with parse(String). Instead, it throws a ParseException.