Skip to content

Commit

Permalink
use different util to create the tmp dir and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio.Busuladzich committed Nov 24, 2024
1 parent 05531ef commit f348fd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ public static File createTempDir() throws IOException {
final String tempDirNamePrefix = "jenkins";

final Path systemTmpDirectoryPath = Path.of(System.getProperty("java.io.tmpdir"));
if (!systemTmpDirectoryPath.toFile().exists()){
if (!systemTmpDirectoryPath.toFile().exists()) {

Check warning on line 441 in core/src/main/java/hudson/Util.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 441 is only partially covered, one branch is missing
// In some cases the tmp directory set in the java.io.tmpdir property will not exist and hence will have to
// be created here.
systemTmpDirectoryPath.toFile().mkdirs();
Files.createDirectory(systemTmpDirectoryPath);

Check warning on line 444 in core/src/main/java/hudson/Util.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 444 is not covered by tests
}

if (FileSystems.getDefault().supportedFileAttributeViews().contains("posix")) {
Expand Down

0 comments on commit f348fd3

Please sign in to comment.