Skip to content

Commit

Permalink
BUM-204 Some refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanBA92 committed May 23, 2018
1 parent 22c3ba1 commit 051f883
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.agiletestware.bumblebee;

import java.io.IOException;
import java.net.ConnectException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -126,13 +125,8 @@ public FormValidation doSaveConnection(
// Set password only if old value is null/empty/blank OR if new
// value is not equal to old
if (StringUtils.isBlank(this.password) || !this.password.equals(password)) {
this.password = bmapi.getEncryptedPassword(StringUtils.trim(password));
this.password = skipConnectivityDiagnostic ? password : bmapi.getEncryptedPassword(StringUtils.trim(password));
}
} catch (final RuntimeException | ConnectException ex) {
final String encryptedPassword = (StringUtils.isBlank(this.password) || this.password.equals(password)) ? this.password : password;
this.password = encryptedPassword;
save();
return FormValidation.ok("Configuration Saved");
}
save();
} catch (final Exception e) {
Expand Down

0 comments on commit 051f883

Please sign in to comment.