[jboss-cvs] JBossAS SVN: r104499 - in projects/security/security-jboss-sx/branches/Branch_2_0: 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:22 EDT 2010
Author: sguilhen at redhat.com
Date: 2010-05-05 19:00:21 -0400 (Wed, 05 May 2010)
New Revision: 104499
Modified:
projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata/ModuleOptionMetaData.java
projects/security/security-jboss-sx/branches/Branch_2_0/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: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/login/AuthenticationInfo.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/login/AuthenticationInfo.java 2010-05-05 21:31:23 UTC (rev 104498)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/login/AuthenticationInfo.java 2010-05-05 23:00:21 UTC (rev 104499)
@@ -104,7 +104,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: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata/ModuleOptionMetaData.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata/ModuleOptionMetaData.java 2010-05-05 21:31:23 UTC (rev 104498)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/metadata/ModuleOptionMetaData.java 2010-05-05 23:00:21 UTC (rev 104499)
@@ -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