directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r945806 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java
Date Tue, 18 May 2010 18:27:59 GMT
Author: felixk
Date: Tue May 18 18:27:59 2010
New Revision: 945806

URL: http://svn.apache.org/viewvc?rev=945806&view=rev
Log:
Fix NPE when parameter 'names' is null

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java?rev=945806&r1=945805&r2=945806&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/UserClass.java
Tue May 18 18:27:59 2010
@@ -141,7 +141,14 @@ public abstract class UserClass implemen
          */
         protected NamedUserClass( Set<DN> names )
         {
-            this.names = Collections.unmodifiableSet( new HashSet<DN>( names ) );
+            if ( names == null )
+            {
+                this.names = Collections.unmodifiableSet( new HashSet<DN>() );
+            }
+            else
+            {
+                this.names = Collections.unmodifiableSet( new HashSet<DN>( names )
);
+            }
         }
 
 



Mime
View raw message