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

ClassCastException in Regex

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • core-libs
    • None
    • b91
    • Verified

      Testcase attached.

      Exception in thread "main" java.lang.ClassCastException: jdk.nashorn.internal.objects.NativeRegExpExecResult cannot be cast to jdk.nashorn.internal.objects.NativeArray
      at jdk.nashorn.internal.objects.NativeArray.slice(NativeArray.java:783)
      at jdk.nashorn.internal.scripts.Script$regex.runScript(regex.js:4)
      at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:510)
      at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:202)
      at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:345)
      at jdk.nashorn.tools.Shell.apply(Shell.java:385)
      at jdk.nashorn.tools.Shell.runScripts(Shell.java:314)
      at jdk.nashorn.tools.Shell.run(Shell.java:177)
      at jdk.nashorn.tools.Shell.main(Shell.java:142)
      at jdk.nashorn.tools.Shell.main(Shell.java:121)

            hannesw Hannes Wallnoefer
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: