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

IllegalArgumentException in the launcher when exception without stack trace is thrown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • 11, 25
    • tools
    • None
    • In Review

      Attached TestLauncher.java triggers an exception in the Launcher because a java.lang.ClassCastException with no stack trace is thrown by C2 which seems to be unexpected:

      java TestLauncher.java
      Exception in thread "main" java.lang.IllegalArgumentException: 0 > -5
      at java.base/java.util.Arrays.copyOfRange(Arrays.java:3804)
      at java.base/java.util.Arrays.copyOfRange(Arrays.java:3764)
      at jdk.compiler/com.sun.tools.javac.launcher.SourceLauncher.execute(SourceLauncher.java:267)
      at jdk.compiler/com.sun.tools.javac.launcher.SourceLauncher.run(SourceLauncher.java:138)
      at jdk.compiler/com.sun.tools.javac.launcher.SourceLauncher.main(SourceLauncher.java:76)

      This can happen if OmitStackTraceInFastThrow is enabled (default).

            cstein Christian Stein
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: