portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r550926 - /portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java
Date Tue, 26 Jun 2007 20:12:10 GMT
Author: esm
Date: Tue Jun 26 13:12:10 2007
New Revision: 550926

URL: http://svn.apache.org/viewvc?view=rev&rev=550926
Log:
[PLUTO-383]: Return empty user info map if no user info is found for the logged in user. (1.1.x)

Modified:
    portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java

Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java?view=diff&rev=550926&r1=550925&r2=550926
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java
(original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java
Tue Jun 26 13:12:10 2007
@@ -16,13 +16,15 @@
  */
 package org.apache.pluto.core;
 
-import org.apache.pluto.spi.optional.UserInfoService;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.PortletWindow;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.portlet.PortletRequest;
-import java.util.Map;
-import java.util.HashMap;
+
+import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.spi.optional.UserInfoService;
 
 /**
  * UserInfo
@@ -35,7 +37,10 @@
     public Map getUserInfo(PortletRequest request)
         throws PortletContainerException {
         if ( request.getRemoteUser() != null ) {
-        	return (Map)userInfoMap.get(request.getRemoteUser());
+        	Map info = (Map)userInfoMap.get(request.getRemoteUser());
+            if ( info == null ) {
+                return Collections.EMPTY_MAP;
+            }
         }
         return new HashMap();
     }



Mime
View raw message