-
Bug
-
Resolution: Fixed
-
P4
-
8u20
-
b04
-
b31
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085719 | emb-9 | Hannes Wallnoefer | P4 | Resolved | Fixed | team |
JDK-8064224 | 8u45 | Hannes Wallnoefer | P4 | Resolved | Fixed | b01 |
JDK-8058237 | 8u40 | Hannes Wallnoefer | P4 | Resolved | Fixed | b06 |
JDK-8070461 | emb-8u47 | Hannes Wallnoefer | P4 | Resolved | Fixed | team |
The avatar.js test test-repl.js throws this exception with 8u40 - "java.lang.ClassCastException: jdk.nashorn.internal.scripts.JO4 cannot be cast to jdk.nashorn.internal.runtime.UserAccessorProperty$Accessors".
This error does not occur with 8u20. It also occurs with 8u40 with optimistic types turned off.
The error happens here -
sending "url.format(\"http://google.com\")"
Unix data: "java.lang.ClassCastException: jdk.nashorn.internal.scripts.JO4 cannot be cast to jdk.nashorn.internal.runtime.UserAccessorProperty$Accessors\nnode via Unix socket> ", expecting "http://google.com/"
This error can also be reproduced running the REPL manually -
java -Dnashorn.args='--optimistic-types=false' -jar dist/avatar-js.jar
> url.format("http://google.com")
java.lang.ClassCastException: jdk.nashorn.internal.scripts.JO4 cannot be cast to jdk.nashorn.internal.runtime.UserAccessorProperty$Accessors
But a simple test case works fine -
cat format.js
print(require('url').format("http://google.com"));
java -Dnashorn.args='--optimistic-types=false' -jar dist/avatar-js.jar format.js
http://google.com/
Something in url.format does not work with 8u40 when called by a REPL.
This error does not occur with 8u20. It also occurs with 8u40 with optimistic types turned off.
The error happens here -
sending "url.format(\"http://google.com\")"
Unix data: "java.lang.ClassCastException: jdk.nashorn.internal.scripts.JO4 cannot be cast to jdk.nashorn.internal.runtime.UserAccessorProperty$Accessors\nnode via Unix socket> ", expecting "http://google.com/"
This error can also be reproduced running the REPL manually -
java -Dnashorn.args='--optimistic-types=false' -jar dist/avatar-js.jar
> url.format("http://google.com")
java.lang.ClassCastException: jdk.nashorn.internal.scripts.JO4 cannot be cast to jdk.nashorn.internal.runtime.UserAccessorProperty$Accessors
But a simple test case works fine -
cat format.js
print(require('url').format("http://google.com"));
java -Dnashorn.args='--optimistic-types=false' -jar dist/avatar-js.jar format.js
http://google.com/
Something in url.format does not work with 8u40 when called by a REPL.
- backported by
-
JDK-8058237 Global constants get in the way of self-modifying properties
-
- Resolved
-
-
JDK-8064224 Global constants get in the way of self-modifying properties
-
- Resolved
-
-
JDK-8070461 Global constants get in the way of self-modifying properties
-
- Resolved
-
-
JDK-8085719 Global constants get in the way of self-modifying properties
-
- Resolved
-