IllegalArgumentException in the launcher when exception without stack trace is thrown

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 11, 25
    • Component/s: tools
    • None
    • b10

      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).

            Assignee:
            Christian Stein
            Reporter:
            Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: