diff --git a/src/main/java/org/javaswift/joss/client/core/AbstractAccount.java b/src/main/java/org/javaswift/joss/client/core/AbstractAccount.java index ddaad5fc..bdfe22f0 100644 --- a/src/main/java/org/javaswift/joss/client/core/AbstractAccount.java +++ b/src/main/java/org/javaswift/joss/client/core/AbstractAccount.java @@ -74,7 +74,7 @@ public String getHashPassword() { @Override public AbstractAccount setHashPassword(String hashPassword) { LOG.info("JOSS / Setting hash password"); - if (hashPassword != null && !hashPassword.equals(getHashPassword())) { + if (hashPassword != null && (getHashPassword() == null || "".equals(getHashPassword()))) { LOG.info("JOSS / Hash password not yet saved, saving now"); this.commandFactory.createHashPasswordCommand(this, hashPassword).call(); }