modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit b19ccea4c8917e9481326a376555c413a151fe95 Author: Jay Shaughnessy jshaughn@redhat.com Date: Thu Sep 26 11:26:34 2013 -0400
Don't consider a blank string a valid storage username or password
diff --git a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java index 59c9360..408442a 100644 --- a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java +++ b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java @@ -43,12 +43,14 @@ import org.rhq.common.jbossas.client.controller.WebJBossASClient; import org.rhq.core.db.DatabaseTypeFactory; import org.rhq.core.domain.cloud.StorageNode; import org.rhq.core.util.PropertiesFileUpdate; +import org.rhq.core.util.StringUtil; import org.rhq.core.util.exception.ThrowableUtil; import org.rhq.core.util.obfuscation.Obfuscator; import org.rhq.core.util.obfuscation.PicketBoxObfuscator; import org.rhq.enterprise.server.installer.ServerInstallUtil.ExistingSchemaOption; import org.rhq.enterprise.server.installer.ServerInstallUtil.SupportedDatabaseType;
+ /** * @author John Mazzitelli */ @@ -512,10 +514,10 @@ public class InstallerServiceImpl implements InstallerService { clearTextDbPassword); String storageUsernameSetting = storageProperties.get(ServerProperties.PROP_STORAGE_USERNAME); String storagePasswordSetting = storageProperties.get(ServerProperties.PROP_STORAGE_PASSWORD); - if (null != storageUsernameSetting) { + if (StringUtil.isNotBlank(storageUsernameSetting)) { serverProperties.put(ServerProperties.PROP_STORAGE_USERNAME, storageUsernameSetting); } - if (null != storagePasswordSetting) { + if (StringUtil.isNotBlank(storagePasswordSetting)) { serverProperties.put(ServerProperties.PROP_STORAGE_PASSWORD, storagePasswordSetting); }
rhq-commits@lists.fedorahosted.org