portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r698143 - /portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.java
Date Tue, 23 Sep 2008 11:19:55 GMT
Author: vkumar
Date: Tue Sep 23 04:19:55 2008
New Revision: 698143

URL: http://svn.apache.org/viewvc?rev=698143&view=rev
Log:
Adding null check for prinicpal

Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.java

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.java?rev=698143&r1=698142&r2=698143&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/DefaultJetspeedPrincipalSynchronizer.java
Tue Sep 23 04:19:55 2008
@@ -130,7 +130,7 @@
             // update / create corresponding JetspeedPrincipal first
             updatedPrincipal = synchronizePrincipalAttributes(entity);
 
-            if (updatedPrincipal != null)
+            if (updatedPrincipal != null && entityToRelationTypes.values().size()
!= 0)
             {
                 // loop through all relation types for this entity type
                 for (SecurityEntityRelationType relationTypeForThisEntity : entityToRelationTypes.get(entity.getType()))
@@ -308,7 +308,7 @@
                         {
                             principalAttr = principalAttrs.getAttribute(addedEntityAttr.getMappedName(),
true);
                         }
-                        principalAttr.setStringValue(addedEntityAttr.getValue());
+                        if (principalAttr!=null) principalAttr.setStringValue(addedEntityAttr.getValue());
                     } 
                     catch (SecurityException e)
                     {



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message