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

noSuchProperty can't cope with vararg functions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • core-libs
    • None
    • b100
    • generic
    • generic
    • Verified

    Description

      __noSuchProperty__ = function() {
          print("obj.__noSuchProperty__ for " + arguments[0]);
      }
      notthere;


      java.lang.ClassCastException: Cannot cast java.lang.String to [Ljava.lang.Object;
      at java.lang.Class.cast(Class.java:3038)
      at java.lang.invoke.MethodHandles.insertArguments(MethodHandles.java:1680)
      at jdk.nashorn.internal.lookup.MethodHandleFactory$StandardMethodHandleFunctionality.insertArguments(MethodHandleFactory.java:292)
      at jdk.nashorn.internal.runtime.ScriptFunction.bindToNameIfNeeded(ScriptFunction.java:547)
      at jdk.nashorn.internal.runtime.ScriptFunction.getCallMethodHandle(ScriptFunction.java:543)
      at jdk.nashorn.internal.runtime.ScriptObject.getCallMethodHandle(ScriptObject.java:992)
      at jdk.nashorn.internal.runtime.ScriptObject.noSuchProperty(ScriptObject.java:1958)
      at jdk.nashorn.internal.runtime.ScriptObject.findGetMethod(ScriptObject.java:1694)
      at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1603)
      at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:77)
      at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
      at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
      at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:138)
      at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:229)
      at jdk.nashorn.internal.scripts.Script$cl.runScript(cl.js:4)
      at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:510)
      at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:205)
      at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:345)
      at jdk.nashorn.tools.Shell.apply(Shell.java:332)
      at jdk.nashorn.tools.Shell.runScripts(Shell.java:299)
      at jdk.nashorn.tools.Shell.run(Shell.java:171)
      at jdk.nashorn.tools.Shell.main(Shell.java:139)
      at jdk.nashorn.tools.Shell.main(Shell.java:118)

      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            lagergren Marcus Lagergren
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: