Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-3905

The Spoon rule forbidding Files#createTempFile without a parent directory is not applied

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      The Spoon ForbiddenInvocationProcessor configuration in xwiki-commons-pom is supposed to forbid, among others, Files#createTempFile(String, String, FileAttribute...), which creates the file in the standard Java temporary directory instead of the one allocated to XWiki (see XCOMMONS-3084).

      But the entry was written as java.nio.file.Files#createTempDirectory(java.lang.String,java.lang.String,java.nio.file.attribute.FileAttribute[]), a method which does not exist in the JDK. Since the processor only compares signatures, the entry never matches anything and calling Files.createTempFile(prefix, suffix) is not reported.

      The entry should be java.nio.file.Files#createTempFile(java.lang.String,java.lang.String,java.nio.file.attribute.FileAttribute[]).

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: