]> git.mxchange.org Git - addressbook-core.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Fri, 23 Jun 2017 22:17:30 +0000 (00:17 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 23 Jun 2017 22:18:36 +0000 (00:18 +0200)
- put() does not accept NULL values (throws NPE)

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/addressbook/database/BaseAddressbookDatabaseBean.java

index 57b8abce7e5ec2bf2c1e78442ee725b9655cb052..1664575ee780f4d1584370bc8df05129d58eff71 100644 (file)
@@ -501,7 +501,12 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
 
                // Set base URL and random password
                variables.put("baseUrl", baseUrl); //NOI18N
-               variables.put("randomPassword", randomPassword); //NOI18N
+               variables.put("randomPassword", ""); //NOI18N
+
+               // Is the random password set?
+               if ((randomPassword instanceof String) && (!randomPassword.isEmpty())) {
+                       variables.put("randomPassword", randomPassword); //NOI18N
+               }
 
                // Set all
                // @TODO Language from message bundle