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

delete of bound Java method property results in crash

    Details

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

      Backports

        Description

        File: deletebound.js
        -----------------------------

        var obj = Object.bindProperties({},
            java.lang.System.console());

        delete obj.wait;


        jjs -J-Djava.ext.dirs=dist deletebound.js
        Exception in thread "main" java.lang.NullPointerException
        at jdk.nashorn.internal.runtime.AccessorProperty.invokeSetter(AccessorProperty.java:488)
        at jdk.nashorn.internal.runtime.AccessorProperty.setValue(AccessorProperty.java:517)
        at jdk.nashorn.internal.runtime.ScriptObject.erasePropertyValue(ScriptObject.java:917)
        at jdk.nashorn.internal.runtime.ScriptObject.deleteOwnProperty(ScriptObject.java:929)
        at jdk.nashorn.internal.runtime.ScriptObject.deleteObject(ScriptObject.java:3673)
        at jdk.nashorn.internal.runtime.ScriptObject.delete(ScriptObject.java:3654)
        at jdk.nashorn.internal.runtime.ScriptRuntime.DELETE(ScriptRuntime.java:659)
        at jdk.nashorn.internal.scripts.Script$Recompilation$3$deletebound$cu1$restOf.:program(deletebound.js:4)
        at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
        at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
        at jdk.nashorn.tools.Shell.apply(Shell.java:397)
        at jdk.nashorn.tools.Shell.runScripts(Shell.java:326)
        at jdk.nashorn.tools.Shell.run(Shell.java:172)
        at jdk.nashorn.tools.Shell.main(Shell.java:136)
        at jdk.nashorn.tools.Shell.main(Shell.java:112)

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: