JDK-8150805 : Casting from object to string is not compatible with JRE 9 build 73 (Pre-release) and above
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Incomplete
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2016-02-03
  • Updated: 2016-03-04
  • Resolved: 2016-02-08
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
Java version JRE 1.9 Build b73 (Pre-release) and above.

ADDITIONAL OS VERSION INFORMATION :
ver Windows 7 32bit
       Windows 7 64bit
       Windows 8.1 32bit
       Windows 8.1 64bit
       Windows 10 32bit
       Windows 10 64bit
       Mavericks 10.9.5
       Yosemite 10.10.5

A DESCRIPTION OF THE PROBLEM :
Error while building LogBook/chart.

REGRESSION.  Last worked in version 9

ADDITIONAL REGRESSION INFORMATION: 
Java version JRE 1.9 Build b68 (Pre-release).

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Casting from object to string is not compatible with JRE 9 build 73 (Pre-release) and above


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
- Logbook/Chart should be display
- Print and PDF report should be generate.

ACTUAL -
While opening application using JRE 9 build 73 (pre-release) and above, 
- Error while building Logbook/chart.
- Error while generating Print/PDF.
 

ERROR MESSAGES/STACK TRACES THAT OCCUR :
ERROR (?:?) - Error while building LogBook/chart.
java.lang.ClassCastException: [Ljava.lang.object; cannot be cast to [Ljava.lang.String;

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
String[] stringArray = list.toArray(new String[list.size()]);
return(stringArray);


---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
We have used Casting externally from object to String

String[] stringArray = list.toArray(new String[list.size()]);
return (String[])list.toArray();
.

SUPPORT :
YES


Comments
Seems to be caused by fixing this long standing issue JDK-6260652
04-03-2016

Could not reproduce the issue. Closing as incomplete for now, will reopen once receive additional inputs on the bug.
29-02-2016