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

Nashorn: setter not called

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 8
    • 8
    • core-libs
    • b115
    • os_x

      FULL PRODUCT VERSION :
      java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b115)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b57, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Darwin Laskey.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64


      A DESCRIPTION OF THE PROBLEM :
      Setter function in JSON.parse filter not called.

      REGRESSION. Last worked in version 8

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. run jjs
      2. enter test case
      3. check result

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      p:a-0
      456
      p:x-null
      whoa
      p:b-[object Object]
      p:-[object Object]
      [object Object]

      ACTUAL -
      p:a-0
      456
      p:x-null
      p:b-[object Object]
      p:-[object Object]
      [object Object]


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      JSON.parse('{"a":0,"b":1}', function(p,v){print("p:"+p+"-"+v); if(p=="a"){ this.b = {get x(){print("456"); return null}, set x(_){print("whoa")}} } return v})
      ---------- END SOURCE ----------

            jlaskey Jim Laskey
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: