Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u60
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b42
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        jjs> try{ Object.prototype.toLocaleString.call(0) } catch (e) { e.printStackTrace() }
        java.lang.ClassCastException: java.lang.Integer cannot be cast to jdk.nashorn.internal.runtime.ScriptObject
           at jdk.nashorn.internal.objects.NativeObject.toLocaleString(NativeObject.java:501)
           at jdk.nashorn.internal.scripts.Script$3$\^shell\_.:program(<shell>:1)
           at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
           at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)
           at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)
           at jdk.nashorn.internal.runtime.Context.eval(Context.java:715)
           at jdk.nashorn.internal.runtime.Context.eval(Context.java:645)
           at jdk.nashorn.tools.Shell.readEvalPrint(Shell.java:450)
           at jdk.nashorn.tools.Shell.run(Shell.java:158)
           at jdk.nashorn.tools.Shell.main(Shell.java:133)
           ...

        Expected: Returns "0"
        Actual: ClassCastException

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hannesw Hannes Wallnoefer
                  Reporter:
                  lagergren Marcus Lagergren
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: