-
Bug
-
Resolution: Fixed
-
P3
-
8u40
-
None
-
b39
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085772 | emb-9 | Marcus Lagergren | P3 | Resolved | Fixed | team |
JDK-8065520 | 8u45 | Marcus Lagergren | P3 | Resolved | Fixed | b01 |
JDK-8063030 | 8u40 | Marcus Lagergren | P3 | Resolved | Fixed | b15 |
JDK-8070509 | emb-8u47 | Marcus Lagergren | P3 | Resolved | Fixed | team |
When String.prototype.charCodeAt() is called with an invalid index argument it throws a ClassCastException.
jjs> "abc".charCodeAt(10)
java.lang.ClassCastException
java.lang.ClassCastException
at jdk.nashorn.internal.objects.NativeString.getValidChar(NativeString.java:575)
at jdk.nashorn.internal.objects.NativeString.charCodeAt(NativeString.java:623)
at jdk.nashorn.internal.scripts.Script$Recompilation$3$\^shell\_.:program(<shell>:1)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)
at jdk.nashorn.internal.runtime.Context.eval(Context.java:697)
at jdk.nashorn.internal.runtime.Context.eval(Context.java:627)
at jdk.nashorn.tools.Shell.readEvalPrint(Shell.java:450)
at jdk.nashorn.tools.Shell.run(Shell.java:158)
at jdk.nashorn.tools.Shell.main(Shell.java:133)
at jdk.nashorn.tools.Shell.main(Shell.java:112)
It looks like this is caused byJDK-8025435
http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/f0b5e3900a10
jjs> "abc".charCodeAt(10)
java.lang.ClassCastException
java.lang.ClassCastException
at jdk.nashorn.internal.objects.NativeString.getValidChar(NativeString.java:575)
at jdk.nashorn.internal.objects.NativeString.charCodeAt(NativeString.java:623)
at jdk.nashorn.internal.scripts.Script$Recompilation$3$\^shell\_.:program(<shell>:1)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)
at jdk.nashorn.internal.runtime.Context.eval(Context.java:697)
at jdk.nashorn.internal.runtime.Context.eval(Context.java:627)
at jdk.nashorn.tools.Shell.readEvalPrint(Shell.java:450)
at jdk.nashorn.tools.Shell.run(Shell.java:158)
at jdk.nashorn.tools.Shell.main(Shell.java:133)
at jdk.nashorn.tools.Shell.main(Shell.java:112)
It looks like this is caused by
http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/f0b5e3900a10
- backported by
-
JDK-8063030 String.prototype.charCodeAt called with invalid index throws ClassCastException
-
- Resolved
-
-
JDK-8065520 String.prototype.charCodeAt called with invalid index throws ClassCastException
-
- Resolved
-
-
JDK-8070509 String.prototype.charCodeAt called with invalid index throws ClassCastException
-
- Resolved
-
-
JDK-8085772 String.prototype.charCodeAt called with invalid index throws ClassCastException
-
- Resolved
-