Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7904002

@compile directives with args after file name fail after 7903955

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • jtreg7.5.2
    • jtreg7.5.2
    • tools
    • None
    • generic
    • generic

      After commit 79d3fee395060a (CODETOOLS-7903955) tests with @compile directives with args after the source file name fails in the openjdk test suite. An example is test/langtools/tools/javac/6521805/T6521805d.java:

          /*
           * @test /nodynamiccopyright/
           * @bug 6521805
           * @summary Regression: JDK5/JDK6 javac allows write access to outer class reference
           * @author mcimadamore
           *
           * @compile/fail/ref=T6521805d.out T6521805d.java -XDrawDiagnostics
           */

      Which fails with the following message:

          test result: Error. Parse Exception: Can't find source file: -DrawDiagnostics

      This is because the CompileAction::init method will set the foundJavaFile flag to true when an arg ending with `.java`, but will not clear the flag before checking the next argument.

            haraldei Harald Eilertsen
            haraldei Harald Eilertsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: