JDK-8073210 : javadoc of DateFormat methods should specify NullPointerExceptions
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 8u31
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_8
  • CPU: x86
  • Submitted: 2015-02-15
  • Updated: 2016-11-09
  • Resolved: 2016-11-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorResolved
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

A DESCRIPTION OF THE PROBLEM :
The following methods in DateFormat should specify the behavior of passing null as parameters:

format(Date date)
@throws NullPointerException if date is null

format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)
@throws NullPointerException if any of the parameters is null

parse(String source)
@throws NullPointerException if source is null

parse(String source, ParsePosition pos)
@throws NullPointerException if any of the parameters is null

setTimeZone(TimeZone zone)
@throws NullPointerException if zone is null


REPRODUCIBILITY :
This bug can be reproduced always.