-
Bug
-
Resolution: Duplicate
-
P3
-
8, 9
-
generic
-
generic
FULL PRODUCT VERSION :
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
A DESCRIPTION OF THE PROBLEM :
For Java objects being used from JavaScript, accessing an undefined property using a variable returns 'null' whereas it should returned 'undefined'.
jjs> var point = new java.awt.Point(2,3)
jjs> point['x']
2
jjs> var propertyName = 'x'
jjs> point[propertyName]
2
jjs> propertyName = 'foo'
foo
jjs> point[propertyName] === undefined
false
jjs> point[propertyName]
null
jjs> point['foo'] === undefined
true
jjs>
JavaScript objects behave correctly.
jjs> var point = {x:2, y:3}
jjs> var propertyName = 'foo'
jjs> point[propertyName] === undefined
true
jjs>
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
A DESCRIPTION OF THE PROBLEM :
For Java objects being used from JavaScript, accessing an undefined property using a variable returns 'null' whereas it should returned 'undefined'.
jjs> var point = new java.awt.Point(2,3)
jjs> point['x']
2
jjs> var propertyName = 'x'
jjs> point[propertyName]
2
jjs> propertyName = 'foo'
foo
jjs> point[propertyName] === undefined
false
jjs> point[propertyName]
null
jjs> point['foo'] === undefined
true
jjs>
JavaScript objects behave correctly.
jjs> var point = {x:2, y:3}
jjs> var propertyName = 'foo'
jjs> point[propertyName] === undefined
true
jjs>
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-8144919 Implement missing member handler for BeansLinker
-
- Resolved
-