Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2069

Utf8RecodingDeferredFileOutputStream write doesn't protect caller from privileged action

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Maven Surefire Plugin
    • None

    Description

      See https://github.com/eclipse-equinox/equinox.framework/issues/32

      We see the following exception:

      Caused by: java.lang.SecurityException: Unable to create temporary file or directory
      at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:142)
      at java.base/java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160)
      at java.base/java.nio.file.Files.createTempFile(Files.java:912)
      at org.apache.maven.plugin.surefire.report.Utf8RecodingDeferredFileOutputStream.write(Utf8RecodingDeferredFileOutputStream.java:69)
      at org.apache.maven.plugin.surefire.report.TestSetRunListener.writeTestOutput(TestSetRunListener.java:180)
      at org.apache.maven.plugin.surefire.report.TestSetRunListener.writeTestOutput(TestSetRunListener.java:49)
      at org.apache.maven.surefire.junitplatform.RunListenerAdapter.writeTestOutput(RunListenerAdapter.java:379)
      at org.apache.maven.surefire.api.report.ConsoleOutputCapture$ForwardingPrintStream.println(ConsoleOutputCapture.java:138)
      at security.b.Activator.start(Activator.java:28)

      Where the class security.b.Activator doesn't have permission to create files in the directory there.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tjwatson Tom Watson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: