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. (#475)

move if before assignation to fix backward compatibility
  • Loading branch information
adrienzieba authored Aug 25, 2020
1 parent 8702cc4 commit 329c3a1
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 329c3a1

Please sign in to comment.