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

Test tools/javac/api/TestJavacTaskWithWarning.java writes files in src dir

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 25
    • 25
    • tools
    • b10

      test/langtools/tools/javac/api/TestJavacTaskWithWarning.java fails if the src directory is read-only, as it writes a temporary src file in the src tree. Jtreg tests are given a scratch dir where they can create any files needed and that should be used instead.

      Stacktrace:
              TestJavacTaskWithWarning
      ----------System.err:(15/1036)----------
      java.io.FileNotFoundException: /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+9-924/src.full/open/test/langtools/tools/javac/api/GeneratesWarning.java (Permission denied)
      at java.base/java.io.FileOutputStream.open0(Native Method)
      at java.base/java.io.FileOutputStream.open(FileOutputStream.java:255)
      at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:210)
      at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:171)
      at TestJavacTaskWithWarning.warningTest(TestJavacTaskWithWarning.java:55)
      at TestJavacTaskWithWarning.main(TestJavacTaskWithWarning.java:83)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:565)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1447)

            darcy Joe Darcy
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: