]> git.mxchange.org Git - jjobs-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:32 +0000 (00:18 +0200)
- put() does not accept NULL values (throws NPE)

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

index 3789adbcd4a077acb2b84b041eb27a40df4b3655..4bb446275990f4a61d9c0c15218bd79ae2d52632 100644 (file)
@@ -501,7 +501,12 @@ public abstract class BaseJobsDatabaseBean 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