JDK-8067000 : Error in documentation of class DateTimeFormatter
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.time
  • Affected Version: 8,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows_7
  • Submitted: 2013-12-01
  • Updated: 2015-01-30
  • Resolved: 2015-01-30
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java 8

A DESCRIPTION OF THE PROBLEM :
Documentation gives this line of code to format date:
"
String text = date.toString(formatter);
"

It should be
"
String text = date.format(formatter);
"

BTW: The line above says correctly that the format method is for formatting.


REPRODUCIBILITY :
This bug can be reproduced always.
Comments
Already fixed, though not visible on docs.oracle.com
30-01-2015

2 instances need correction in https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
09-12-2014