Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8007140

Java.extend crashes when attempting to extend java.lang.Object

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • None
    • core-libs
    • None
    • b82
    • Verified

    Description

      The following one liner crashes with the stack trace below:

      var MyClass = Java.extend(java.lang.Object);

      Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at java.util.ArrayList.rangeCheck(ArrayList.java:603)
      at java.util.ArrayList.get(ArrayList.java:381)
      at jdk.nashorn.internal.runtime.linker.JavaAdapterFactory.getGeneratedClassName(JavaAdapterFactory.java:290)
      at jdk.nashorn.internal.runtime.linker.JavaAdapterFactory.<init>(JavaAdapterFactory.java:263)
      at jdk.nashorn.internal.runtime.linker.JavaAdapterFactory.<init>(JavaAdapterFactory.java:139)
      at jdk.nashorn.internal.runtime.linker.JavaAdapterFactory$5.run(JavaAdapterFactory.java:1128)
      at jdk.nashorn.internal.runtime.linker.JavaAdapterFactory$5.run(JavaAdapterFactory.java:1124)
      at java.security.AccessController.doPrivileged(Native Method)
      at jdk.nashorn.internal.runtime.linker.JavaAdapterFactory.createAdapterInfo(JavaAdapterFactory.java:1124)
      [.. more frames removed ..]

      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: