portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r1735310 - /portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/UserSessionPreferences.java
Date Wed, 16 Mar 2016 21:42:15 GMT
Author: taylor
Date: Wed Mar 16 21:42:14 2016
New Revision: 1735310

URL: http://svn.apache.org/viewvc?rev=1735310&view=rev
Log:
JS2-1353: check for null window ids in User Session Preferences

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/UserSessionPreferences.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/UserSessionPreferences.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/UserSessionPreferences.java?rev=1735310&r1=1735309&r2=1735310&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/UserSessionPreferences.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/UserSessionPreferences.java
Wed Mar 16 21:42:14 2016
@@ -35,17 +35,24 @@ public class UserSessionPreferences {
     private Map<String,Map<String,PortletPreference>> windowPreferences = new
ConcurrentHashMap<>();
 
     public Map<String,PortletPreference> getWindowPreferences(String portletWindowId)
{
-        return windowPreferences.get(portletWindowId);
+        if (portletWindowId != null) {
+            return windowPreferences.get(portletWindowId);
+        }
+        return null;
     }
 
     public Map<String,PortletPreference> createWindowPreferences(String portletWindowId)
{
         Map<String,PortletPreference> preferences = new HashMap<>();
-        windowPreferences.put(portletWindowId, preferences);
+        if (portletWindowId != null) {
+            windowPreferences.put(portletWindowId, preferences);
+        }
         return preferences;
     }
 
     public Map<String,PortletPreference> updateWindowPreferences(String portletWindowId,
Map<String,PortletPreference> preferences) {
-        windowPreferences.put(portletWindowId, preferences);
+        if (portletWindowId != null) {
+            windowPreferences.put(portletWindowId, preferences);
+        }
         return preferences;
     }
 



---------------------------------------------------------------------
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