JDK-8129881 : JDK-8008577 breaks Nashorn test
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-06-25
  • Updated: 2016-08-24
  • Resolved: 2015-08-04
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 9
9 b77Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
JDK-8008577 causes a Nashorn test to break:

[testng] Test test/script/basic/NASHORN-627.js failed at line 1 -
[testng]   expected: 'Sun Dec 21 1969 00:00:00 GMT+0100 (CET) -954000000 1969-12-20T23:00:00.000Z'
[testng]      found: 'Sun Dec 21 1969 00:00:00 GMT+0100 (CEST) -954000000 1969-12-20T23:00:00.000Z'

It seems like the Nashorn test is correct, but the JDK-8008577 causes a regression that the test caught.

To reproduce:

- build JDK9 tip and set its build/<platform>/jdk directory as JAVA_HOME
- go to jdk9/nashorn/make
- execute "ant test"

Comments
This is due to switching the locale data to CLDR. In some locales, CLDR does not define a short name for a time zone, so the Java runtime just abbreviates the long name. In this case, the logic shortens the long name "Central European Standard Time" to "CEST" which is obviously incorrect.
25-06-2015