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

[TEST_BUG] Try without catch or finally results in compilation error for 3 tests in JDK 6u91b05

    XMLWordPrintable

    Details

    • Introduced In Build:
      b05
    • Introduced In Version:
    • Resolved In Build:
      b09
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Testsuite name: j2se_rest
        Test name(s): com/sun/tools/attach/BasicTests.java
        Product(s) tested: JDK 6u91b05
        OS/architecture: Linux
        Product Bug or Test Bug : Test Bug
        Reproducible: Always
        Reproducible on machine: stt-33.ru.oracle.com, spb23117.ru.oracle.com, spb23297.ru.oracle.com(Windows)

        Is it a Regression: No
        Regression introduced in release/build: N/A
        Test result on the last GAed release for this train:
        Test result on FCS:
        Is it a platform specific issue: No( fails in linux and windows)

        Exception/Error from Log:
        ----------System.err:(16/919)----------
        /export/local/aurora/CommonData/j2se/test/com/sun/tools/attach/Application.java:30: '{' expected
                try (PrintWriter writer = new PrintWriter(outFileName)) {
                   ^
        /export/local/aurora/CommonData/j2se/test/com/sun/tools/attach/Application.java:30: ')' expected
                try (PrintWriter writer = new PrintWriter(outFileName)) {
                                ^
        /export/local/aurora/CommonData/j2se/test/com/sun/tools/attach/Application.java:30: ';' expected
                try (PrintWriter writer = new PrintWriter(outFileName)) {
                                                                      ^
        /export/local/aurora/CommonData/j2se/test/com/sun/tools/attach/Application.java:30: 'try' without 'catch' or 'finally'
                try (PrintWriter writer = new PrintWriter(outFileName)) {
                ^
        /export/local/aurora/CommonData/j2se/test/com/sun/tools/attach/Application.java:42: reached end of file while parsing
        }
         ^
        5 errors
        result: Failed. Compilation failed: Compilation failed


        test result: Failed. Compilation failed: Compilation failed

        Test run log location:
        Steps to reproduce:
        1. login into stt-33.ru.oracle.com
        2. run : /export/jdk/jdk1.6.0_91b05/bin/java -jar /net/stt-13.ru.oracle.com/export/home0/regression/tools/jtreg/lib/jtreg.jar -timeout:10 -noreport -verbose -vmoptions:'-Xmixed -server -d64' -automatic -jdk:/export/jdk/jdk1.6.0_91b05 -r:/export/home/gtee -w:/export/home/gtee/ -dir:/net/stt-13.ru.oracle.com/export/home0/regression/workspaces/1.6.0/1.6.0_91b05/j2se/test com/sun/tools/attach/BasicTests.java

        New code has been added in Application.java which is causing compilation error as try-with-resources statement is introduced in JDK 7.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                aeriksso Andreas Eriksson (Inactive)
                Reporter:
                sgupta Shobhit Gupta
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Due:
                  Created:
                  Updated:
                  Resolved: