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

javascript/nashorn - calling java.lang.Long.toString(long) fails

    Details

    • Subcomponent:
    • Introduced In Version:
    • CPU:
      generic
    • OS:
      generic

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_144"
      Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

      (and also java version "1.8.0_141") The build 141 does not work on on Linux 64bit too.

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]
      64bit version

      A DESCRIPTION OF THE PROBLEM :
      create a java object in javascript and call method with more signatures, here java.lang.Long.toString(long)

      Exception is thrown:
      <shell>:1 TypeError: Can not invoke method [jdk.internal.dynalink.beans.SimpleDynamicMethod String java.lang.Long.toString()] with the passed arguments; they do not match any of its method signatures.

      REGRESSION. Last worked in version 7u76

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_72"
      Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      execute jjs.exe and enter two lines:
      var x = new java.lang.Long(10)
      print (x.toString(16))

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      no exception
      ACTUAL -
      <shell>:1 TypeError: Can not invoke method [jdk.internal.dynalink.beans.SimpleDynamicMethod String java.lang.Long.toString()] with the passed arguments; they do not match any of its method signatures.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      see above

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      see above, no java code needed.
      ---------- END SOURCE ----------

        Attachments

          Activity

            People

            • Assignee:
              hannesw Hannes Wallnoefer
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: