Skip to content

refactor: Java Security Ultimate Scan 2023 #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/com/amazonaws/codedeploy/AWSClients.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.file.Files;
import java.util.UUID;

import com.amazonaws.AmazonServiceException;
Expand Down Expand Up @@ -162,7 +163,7 @@ public void testConnection(String s3bucket, String codeDeployApplication) throws
}

private File createTestFile() throws IOException {
File file = File.createTempFile("codedeploy-jenkins-plugin", ".txt");
File file = Files.createTempFile("codedeploy-jenkins-plugin", ".txt").toFile();
file.deleteOnExit();

Writer writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.file.Files;
import java.util.Date;
import java.util.Map;
import java.util.UUID;
Expand Down Expand Up @@ -326,7 +327,7 @@ private RevisionLocation zipAndUpload(AWSClients aws, String projectName, FilePa
logger.println("File already exists, overwriting: " + zipFile.getPath());
}
} else {
zipFile = File.createTempFile(projectName + "-", ".zip");
zipFile = Files.createTempFile(projectName + "-", ".zip").toFile();
}

String key;
Expand Down