[jboss-cvs] Picketbox SVN: r88 - in trunk/security-jboss-sx: jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed May 5 19:00:15 EDT 2010
Author: sguilhen at redhat.com
Date: 2010-05-05 19:00:14 -0400 (Wed, 05 May 2010)
New Revision: 88
Modified:
trunk/security-jboss-sx/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata/ModuleOptionMetaData.java
trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/login/AuthenticationInfo.java
Log:
SECURITY-503: added check in AuthenticationInfo to avoid NPE on toString(). ModuleOptionMetaData now returns an empty String if the option value hasn't been specified
Modified: trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/login/AuthenticationInfo.java
===================================================================
--- trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/login/AuthenticationInfo.java 2010-05-05 20:57:35 UTC (rev 87)
+++ trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/login/AuthenticationInfo.java 2010-05-05 23:00:14 UTC (rev 88)
@@ -114,7 +114,7 @@
{
Entry e = (Entry) iter.next();
String name = (String) e.getKey();
- String value = e.getValue().toString();
+ String value = e.getValue() == null ? "" : e.getValue().toString();
if (name.toLowerCase().equals("password") || name.toLowerCase().equals("bindcredential")
|| name.toLowerCase().equals(Context.SECURITY_CREDENTIALS))
value = "****";
Modified: trunk/security-jboss-sx/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata/ModuleOptionMetaData.java
===================================================================
--- trunk/security-jboss-sx/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata/ModuleOptionMetaData.java 2010-05-05 20:57:35 UTC (rev 87)
+++ trunk/security-jboss-sx/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata/ModuleOptionMetaData.java 2010-05-05 23:00:14 UTC (rev 88)
@@ -73,7 +73,9 @@
*/
public String getValue()
{
- return value;
+ if (this.value == null)
+ return "";
+ return this.value;
}
/**
More information about the jboss-cvs-commits
mailing list