directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1006315 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
Date Sun, 10 Oct 2010 15:54:12 GMT
Author: kayyagari
Date: Sun Oct 10 15:54:11 2010
New Revision: 1006315

URL: http://svn.apache.org/viewvc?rev=1006315&view=rev
Log:
o fixing some more placess where a NPE *might* be possible

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=1006315&r1=1006314&r2=1006315&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
Sun Oct 10 15:54:11 2010
@@ -423,10 +423,11 @@ public class GroupCache
         {
             if ( memberAttrId.equalsIgnoreCase( modification.getAttribute().getId() ) )
             {
-                Set<String> memberSet = ( Set<String> ) ehCache.get( name.getNormName()
).getValue();
-
-                if ( memberSet != null )
+                Element memSetElement = ehCache.get( name.getNormName() );
+                
+                if ( memSetElement != null )
                 {
+                    Set<String> memberSet = ( Set<String> ) memSetElement.getValue();
                     modify( memberSet, modification.getOperation(), modification.getAttribute()
);
                 }
 
@@ -459,10 +460,11 @@ public class GroupCache
             return;
         }
 
-        Set<String> memberSet = ( Set<String> ) ehCache.get( name.getNormName()
).getValue();
+        Element memSetElement = ehCache.get( name.getNormName() );
 
-        if ( memberSet != null )
+        if ( memSetElement != null )
         {
+            Set<String> memberSet = ( Set<String> ) memSetElement.getValue();
             modify( memberSet, modOp, members );
         }
 



Mime
View raw message