cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r367697 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal: coplet/adapter/impl/PortletAdapter.java pluto/servlet/ServletRequestImpl.java
Date Tue, 10 Jan 2006 17:10:28 GMT
Author: cziegeler
Date: Tue Jan 10 09:10:22 2006
New Revision: 367697

URL: http://svn.apache.org/viewcvs?rev=367697&view=rev
Log:
Possible NPE fix

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java?rev=367697&r1=367696&r2=367697&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
Tue Jan 10 09:10:22 2006
@@ -147,7 +147,7 @@
             if ( req == null ) {
                 final HttpServletResponse res = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
                 objectModel.put("portlet-response",  new ServletResponseImpl(res));
-                req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
null);
+                req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
null, portletWindow);
                 objectModel.put("portlet-request",  req);                
             }
             final HttpServletResponse res = (HttpServletResponse) objectModel.get("portlet-response");
@@ -336,7 +336,7 @@
      */
     public void inform(PortletURLProviderImpl event, PortalService service) {
         final Map objectModel = ContextHelper.getObjectModel(this.context);
-        final ServletRequestImpl req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
event);
+        final ServletRequestImpl req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
event, event.getPortletWindow());
         final HttpServletResponse res = new ServletResponseImpl((HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT));
         objectModel.put("portlet-response",  res);
         objectModel.put("portlet-request", req);        
@@ -393,7 +393,7 @@
         } else if ( objectModel.get("portlet-response") == null ) {
             final HttpServletResponse res = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
             objectModel.put("portlet-response",  new ServletResponseImpl(res));
-            final ServletRequestImpl req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
null);
+            final ServletRequestImpl req = new ServletRequestImpl((HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT),
null, event.getPortletWindow());
             objectModel.put("portlet-request",  req);
         }
     }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java?rev=367697&r1=367696&r2=367697&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/servlet/ServletRequestImpl.java
Tue Jan 10 09:10:22 2006
@@ -49,14 +49,7 @@
 
     final protected PortletURLProviderImpl provider;
 
-    protected PortletWindow window;
-
-    public ServletRequestImpl(HttpServletRequest request,
-                              PortletURLProviderImpl provider) {
-        super(request);
-        this.provider = provider;
-        this.originalRequest = request;
-    }
+    final protected PortletWindow window;
 
     public ServletRequestImpl(HttpServletRequest request,
                               PortletURLProviderImpl provider,



Mime
View raw message