[teiid-commits] teiid SVN: r1009 - in trunk: console/src/main/java/com/metamatrix/console/connections and 1 other directory.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Fri May 29 15:52:04 EDT 2009
Author: shawkins
Date: 2009-05-29 15:52:03 -0400 (Fri, 29 May 2009)
New Revision: 1009
Modified:
trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java
trunk/console/src/main/java/com/metamatrix/console/connections/ConnectionInfo.java
Log:
TEIID-634 preventing missing message key using empty password.
Modified: trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java 2009-05-29 02:26:41 UTC (rev 1008)
+++ trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java 2009-05-29 19:52:03 UTC (rev 1009)
@@ -202,14 +202,13 @@
if (userName == null || userName.trim().length() == 0) {
throw new IllegalArgumentException(AdminPlugin.Util.getString("ERR.014.001.0099")); //$NON-NLS-1$
}
- if (password == null || password.length == 0) {
- throw new IllegalArgumentException(AdminPlugin.Util.getString("ERR.014.001.00100")); //$NON-NLS-1$
- }
final Properties p = new Properties();
p.setProperty(MMURL.CONNECTION.APP_NAME, applicationName);
p.setProperty(MMURL.CONNECTION.USER_NAME, userName);
- p.setProperty(MMURL.CONNECTION.PASSWORD, new String(password));
+ if (password != null) {
+ p.setProperty(MMURL.CONNECTION.PASSWORD, new String(password));
+ }
p.setProperty(MMURL.CONNECTION.SERVER_URL, serverURL);
return createAdmin(p);
}
Modified: trunk/console/src/main/java/com/metamatrix/console/connections/ConnectionInfo.java
===================================================================
--- trunk/console/src/main/java/com/metamatrix/console/connections/ConnectionInfo.java 2009-05-29 02:26:41 UTC (rev 1008)
+++ trunk/console/src/main/java/com/metamatrix/console/connections/ConnectionInfo.java 2009-05-29 19:52:03 UTC (rev 1009)
@@ -239,13 +239,12 @@
if (user == null || user.trim().length() == 0) {
throw new IllegalArgumentException(AdminPlugin.Util.getString(AdminMessages.ADMIN_0099));
}
- if (password == null || password.length == 0) {
- throw new IllegalArgumentException(AdminPlugin.Util.getString(AdminMessages.ADMIN_0100));
- }
Properties properties = new Properties();
properties.setProperty(MMURL.CONNECTION.USER_NAME, user);
- properties.setProperty(MMURL.CONNECTION.PASSWORD, new String(password));
+ if (password != null) {
+ properties.setProperty(MMURL.CONNECTION.PASSWORD, new String(password));
+ }
properties.setProperty(MMURL.CONNECTION.APP_NAME, applicationName);
properties.setProperty(MMURL.CONNECTION.SERVER_URL, mmurl.getAppServerURL());
connection = SocketServerConnectionFactory.getInstance().createConnection(properties);
More information about the teiid-commits
mailing list