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

Issues with JSON functions from nashorn-dev alias

XMLWordPrintable

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

      And some bugs in JSONFunctions.

      typeof JSON.parse('{}',function(){})
      => expected "undefined" instead of "object"
      => JSONFunctions#walk() looks a bit wrong.

      Object.defineProperty(Object.prototype,"",{set:
      function(v){print("called set")}})
      JSON.parse('{}',function(){})
      => should not call the setter (use [[DefineOwnProperty]] instead of [[Put]])

      Object.defineProperty(Object.prototype,"foo",{set:
      function(v){print("called set")}})
      JSON.parse('{"foo": 1}')
      => should not call the setter (use [[DefineOwnProperty]] instead of [[Put]])

      - André

        There are no Sub-Tasks for this issue.

            sundar Sundararajan Athijegannathan
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: