[JENKINS-48227] Use "Files.createTempDirectory" to create temp directory (#3161)
* Use "Files.createTempDirectory" to create temp directory instead See SonarQube critical vulnerability squid:S2976 (tag: owasp-a9) https://next.sonarqube.com/sonarqube/coding_rules#rule_key=squid%3AS2976 * [JENKINS-48227] Creating a utility "static Path toPath(File file) throws IOException" method, which wraps InvalidPathException to IOException so that it will be checked. - also fixed public static final reference - fixed broken test cases - added new test cases for toPath() and createTempDir() * Revert back to public static int * adjustments due to merges * Add posix check to determine if Posix FileAttributes should be included in call to Files.createTempDirectory() * Remove reference to private element * Updated to use explicit imports
Please register or sign in to comment