-
Bug
-
Resolution: Fixed
-
P3
-
9.0.1
-
b32
-
x86_64
-
linux
FULL PRODUCT VERSION :
openjdk version "9.0.1"
OpenJDK Runtime Environment (build 9.0.1+11)
OpenJDK 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux jeffrey-XPS-8700 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
A nashorn function that returns the "!!" of a variable returns false whenever that variable is even. It should only be false if it's 0.
jjs> (function(x) { return !!x })(8192)
false
REPRODUCIBILITY :
This bug can be reproduced always.
openjdk version "9.0.1"
OpenJDK Runtime Environment (build 9.0.1+11)
OpenJDK 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux jeffrey-XPS-8700 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
A nashorn function that returns the "!!" of a variable returns false whenever that variable is even. It should only be false if it's 0.
jjs> (function(x) { return !!x })(8192)
false
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-8193789 Function returning a doubly-bool-negated value usually returns a wrong result
-
- Closed
-