JDK-8341343 : Field#get:"Can not get final java.lang.Class field java.lang.Class.componentTyp"
  • Type: Bug
  • Component: core-libs
  • Affected Version: 23
  • Priority: P3
  • Status: New
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2024-09-30
  • Updated: 2024-10-01
Description
ADDITIONAL SYSTEM INFORMATION :
linux 
reproducible in java.vm.version=23+37-2369

Did NOT fail in 23-ea+27-2275
did already fail in JDK 18

A DESCRIPTION OF THE PROBLEM :
Can not get final java.lang.Class field java.lang.Class.componentType on java.lang.Class

java.lang.IllegalArgumentException: Can not get final java.lang.Class field java.lang.Class.componentType on java.lang.Class
at java.base/jdk.internal.reflect.MethodHandleFieldAccessorImpl.newGetIllegalArgumentException(MethodHandleFieldAccessorImpl.java:86)
at java.base/jdk.internal.reflect.MethodHandleObjectFieldAccessorImpl.get(MethodHandleObjectFieldAccessorImpl.java:61)
at java.base/java.lang.reflect.Field.get(Field.java:444)


REGRESSION : Last worked in version 22.0.2

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
launch org.eclipse.jdt.ui.tests.leaks.JavaLeakTest
Fails reproducible in every nightly build

eclipse bugtracker: https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/1664

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
no exception
ACTUAL -
IllegalArgumentException - hiding a  ClassCastException "Cannot cast [I to java.lang.Class"



---------- BEGIN SOURCE ----------
Setup a eclipse IDE workspace - see https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md

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

FREQUENCY : always



Comments
See JDK-8337622.
30-09-2024