JDK-8032888 : Error message typo in TemporalAccessor
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.time
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-01-28
  • Updated: 2016-07-04
  • 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
Description
TemporalAccessor line 220

throw new UnsupportedTemporalTypeException("Invalid field " + field + " + for get() method, use getLong() instead");

has a "+" within the quotes resulting in the error message "UnsupportedTemporalTypeException: Invalid field ModifiedJulianDay + for get() method, use getLong() instead"

Fix is to remove the two characters " +":

throw new UnsupportedTemporalTypeException("Invalid field " + field + " for get() method, use getLong() instead");