sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r785200 - in /incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter: SlingServletRequestAdapter.java SlingServletResponseAdapter.java
Date Tue, 16 Jun 2009 13:16:30 GMT
Author: fmeschbe
Date: Tue Jun 16 13:16:29 2009
New Revision: 785200

URL: http://svn.apache.org/viewvc?rev=785200&view=rev
Log:
SLING-1003 The adapters have to overwrite the getSlingRequest/Response
methods to ensure the base class getRequest/Response method is called
instead of the wrappers own implementation.

Modified:
    incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletRequestAdapter.java
    incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletResponseAdapter.java

Modified: incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletRequestAdapter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletRequestAdapter.java?rev=785200&r1=785199&r2=785200&view=diff
==============================================================================
--- incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletRequestAdapter.java
(original)
+++ incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletRequestAdapter.java
Tue Jun 16 13:16:29 2009
@@ -293,6 +293,15 @@
     }
 
     @Override
+    public SlingHttpServletRequest getSlingRequest() {
+        // overwrite base class getSlingRequest since that method
+        // calls getRequest which is overwritten here to return the
+        // HttpServletRequest - we have to get the actual underlying
+        // request object which is available from the base class
+        return (SlingHttpServletRequest) super.getRequest();
+    }
+
+    @Override
     public RequestDispatcher getRequestDispatcher(String path) {
         return request.getRequestDispatcher(path);
     }

Modified: incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletResponseAdapter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletResponseAdapter.java?rev=785200&r1=785199&r2=785200&view=diff
==============================================================================
--- incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletResponseAdapter.java
(original)
+++ incubator/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/adapter/SlingServletResponseAdapter.java
Tue Jun 16 13:16:29 2009
@@ -179,6 +179,16 @@
         return response;
     }
 
+
+    @Override
+    public SlingHttpServletResponse getSlingResponse() {
+        // overwrite base class getSlingResponse since that method
+        // calls getResponse which is overwritten here to return the
+        // HttpServletResponse - we have to get the actual underlying
+        // response object which is available from the base class
+        return (SlingHttpServletResponse) super.getResponse();
+    }
+
     @Override
     public PrintWriter getWriter() throws IOException {
         return response.getWriter();



Mime
View raw message