Skip to content

Commit

Permalink
Currently the if condition change the value of the variable but not t…
Browse files Browse the repository at this point in the history
…he value of the properties.

move if before assignation to fix backward compatibility
  • Loading branch information
adrienzieba committed Jun 8, 2020
1 parent 8b63bcb commit 7c293a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/hudson/plugins/ec2/WindowsData.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ public WindowsData(String password, boolean useHTTPS, String bootDelay, boolean
this.password = Secret.fromString(password);
this.useHTTPS = useHTTPS;
this.bootDelay = bootDelay;
this.specifyPassword = specifyPassword;
//Backwards compatibility
if (!specifyPassword && !this.password.getPlainText().isEmpty()) {
specifyPassword = true;
}
this.specifyPassword = specifyPassword;

this.allowSelfSignedCertificate = allowSelfSignedCertificate;
}

Expand Down

0 comments on commit 7c293a5

Please sign in to comment.