JDK-8032494 : DateTimeFormatter spec includes irrelevant detail on parsing pattern
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.time
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-01-22
  • Updated: 2014-07-29
  • Resolved: 2014-02-05
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.
JDK 8 JDK 9
8u20Fixed 9 b03Fixed
Related Reports
Relates :  
Description
The class-level Javadoc spec for DateTimeFormatter includes two sentences: "When parsing in strict mode, the number of parsed digits must match the count of pattern letters. When parsing in lenient mode, the number of parsed digits must be at least the count of pattern letters, up to 9 digits." These two sentences do not make sense in context as there is no way to control whether the pattern is strict or lenient from the DateTimeFormatter class. 

Retaining these in the spec could hamper changes in update releases as it implies control or behaviour that cannot be provided through this particular API method.

The solution is to remove the two sentences.

While making this change, line 463 of DateTimeFormatter contains a broken link to the resolve method in TemporalField which should also be fixed.