myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfreed...@apache.org
Subject svn commit: r801002 - /myfaces/portlet-bridge/core/tags/1.0.0-beta-2/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
Date Tue, 04 Aug 2009 22:28:49 GMT
Author: mfreedman
Date: Tue Aug  4 22:28:49 2009
New Revision: 801002

URL: http://svn.apache.org/viewvc?rev=801002&view=rev
Log:
PORTLETBRIDGE-84: NPE from null value in RequestMap

Modified:
    myfaces/portlet-bridge/core/tags/1.0.0-beta-2/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java

Modified: myfaces/portlet-bridge/core/tags/1.0.0-beta-2/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/tags/1.0.0-beta-2/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java?rev=801002&r1=801001&r2=801002&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/tags/1.0.0-beta-2/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
(original)
+++ myfaces/portlet-bridge/core/tags/1.0.0-beta-2/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
Tue Aug  4 22:28:49 2009
@@ -1311,7 +1311,7 @@
 
   private boolean isExcludedFromBridgeRequestScope(String key, Object value, List<String>
preExistingList)
   {
-    return ((value.getClass().getAnnotation(ExcludeFromManagedRequestScope.class) != null)
||
+    return ((value != null && value.getClass().getAnnotation(ExcludeFromManagedRequestScope.class)
!= null) ||
          (preExistingList != null && preExistingList.contains(key)) ||
          isPreDefinedExcludedObject(key, value) ||
          isConfiguredExcludedAttribute(key));
@@ -1319,12 +1319,15 @@
 
   private boolean isPreDefinedExcludedObject(String s, Object o)
   {
-    return o instanceof PortletConfig || o instanceof PortletContext || 
+    if (o != null && (o instanceof PortletConfig || o instanceof PortletContext ||

       o instanceof PortletRequest || o instanceof PortletResponse || o instanceof PortletSession
|| 
       o instanceof PortletPreferences || o instanceof PortalContext || o instanceof FacesContext
|| 
       o instanceof ExternalContext || o instanceof ServletConfig || o instanceof ServletContext
|| 
-      o instanceof ServletRequest || o instanceof ServletResponse || o instanceof HttpSession
|| 
-      isInNamespace(s, "javax.portlet.") ||
+      o instanceof ServletRequest || o instanceof ServletResponse || o instanceof HttpSession))
+      return true;
+    else
+    {
+      return isInNamespace(s, "javax.portlet.") ||
       isInNamespace(s, "javax.portlet.faces.") ||
       isInNamespace(s, "javax.faces.") ||
       isInNamespace(s, "javax.servlet.") ||
@@ -1333,6 +1336,7 @@
       // our ExternalContext uses this prefix internally to append to url which might
       // contain another '.' -- so exclude all that are prefixed with this
       s.startsWith("org.apache.myfaces.portlet.faces.context.");
+    }
   }
 
   private boolean isConfiguredExcludedAttribute(String s)



Mime
View raw message