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

Attempt to access property/element of a Java method results in AssertionError: unknown call type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • 15
    • core-libs
    • None

      Expected: Java method objects don't have properties/elements.
      Unexpected: any attempt to access them crashes the program with an AssertionError, e.g.:

      jjs> java.lang.String.valueOf["(int)"]
      Exception in thread "main" java.lang.AssertionError: unknown call type GET:ELEMENT|PROPERTY|METHOD(Object,Object)Object@org.openjdk.nashorn.internal.scripts.Script$\^shell\_/0x0000000800c09c40
              at org.openjdk.nashorn/org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkBean(NashornBottomLinker.java:124)
              at org.openjdk.nashorn/org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:76)
              at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:109)
              at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(LinkerServicesImpl.java:137)
              at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(LinkerServicesImpl.java:168)
              at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:135)
              at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(DynamicLinker.java:242)
              at org.openjdk.nashorn.scripts/org.openjdk.nashorn.internal.scripts.Script$\^shell\_/0x0000000800c09c40.:program(<shell>:1)

      jjs> java.lang.String.valueOf.call
      Exception in thread "main" java.lang.AssertionError: unknown call type GET:PROPERTY|ELEMENT|METHOD:call(Object)Object@org.openjdk.nashorn.internal.scripts.Script$\^shell\_/0x0000000800c09c40
              at org.openjdk.nashorn/org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkBean(NashornBottomLinker.java:124)
              at org.openjdk.nashorn/org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:76)
              at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:109)
              at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(LinkerServicesImpl.java:137)
              at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(LinkerServicesImpl.java:168)
              at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:135)
              at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(DynamicLinker.java:242)

            attila Attila Szegedi
            aw Andreas Woess
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: