JDK-8072002 : The spec on javax.script.Compilable contains a typo and confusing inconsistency
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.script
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-01-30
  • Updated: 2016-06-13
  • Resolved: 2015-05-20
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
8u60Fixed 9 b66Fixed
Description
The spec 
http://docs.oracle.com/javase/8/docs/api/javax/script/Compilable.html#compile-java.lang.String-

has the following problems:

1) typo: "Returns: An subclass ..."
2) Returns is worded differently than the other - overloaded and functionally identical version of the same method. Please compare:
"Returns:
An subclass of CompiledScript to be executed later using one of the eval methods of CompiledScript."
and
"Returns:
An implementation of CompiledScript to be executed later using one of its eval methods of CompiledScript."

Different wording is confusing since it may give an impression that the methods behave differently and return different results.