Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
pr feedback

Co-authored-by: Antonio Muniz <[email protected]>
  • Loading branch information
mikecirioli and amuniz authored Nov 8, 2024
1 parent e5c8ac8 commit 329e698
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/hudson/plugins/ec2/EC2Cloud.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public abstract class EC2Cloud extends Cloud {

// if this system property is defined and its value points to a valid ssh private key on disk
// then this will be used instead of any configured ssh credential
private static final String sshPrivateKeyFilePath =EC2Cloud.class.getName() + "sshPrivateKeyFilePath";
private static final String SSH_PRIVATE_KEY_FILEPATH = EC2Cloud.class.getName() + ".sshPrivateKeyFilePath";

private transient ReentrantLock slaveCountingLock = new ReentrantLock();

Expand Down Expand Up @@ -215,6 +215,7 @@ public EC2PrivateKey resolvePrivateKey(){
return null;
}

@CheckForNull
private static EC2PrivateKey fetchPrivateKeyFromDisk() {
String filename = System.getProperty(sshPrivateKeyFilePath, "");
if (!filename.isEmpty()) {
Expand Down

0 comments on commit 329e698

Please sign in to comment.