incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r733017 - in /incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl: SlingHttpServletRequestImpl.java SlingHttpServletResponseImpl.java request/RequestData.java
Date Fri, 09 Jan 2009 12:32:25 GMT
Author: cziegeler
Date: Fri Jan  9 04:32:24 2009
New Revision: 733017

URL: http://svn.apache.org/viewvc?rev=733017&view=rev
Log:
Clean up javadocs and remove use of deprecated method.

Modified:
    incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java
    incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
    incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/RequestData.java

Modified: incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java?rev=733017&r1=733016&r2=733017&view=diff
==============================================================================
--- incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java
(original)
+++ incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java
Fri Jan  9 04:32:24 2009
@@ -199,7 +199,7 @@
     public ResourceBundle getResourceBundle(Locale locale) {
         return getResourceBundle(null, locale);
     }
-    
+
     /**
      * @see org.apache.sling.api.SlingHttpServletRequest#getResourceBundle(String, Locale)
      */
@@ -207,7 +207,7 @@
         if (locale == null) {
             locale = getLocale();
         }
-        
+
         return new NullResourceBundle(locale);
     }
 
@@ -225,7 +225,6 @@
     /**
      * @see org.apache.sling.api.SlingHttpServletRequest#getResponseContentTypes()
      */
-    @SuppressWarnings("unchecked")
     public Enumeration<String> getResponseContentTypes() {
         List<String> result = new ArrayList<String>();
 
@@ -263,10 +262,9 @@
     }
 
     /**
-     * @see javax.servlet.http.HttpServletRequestWrapper#isUserInRole()
+     * @see javax.servlet.http.HttpServletRequestWrapper#isUserInRole(String)
      */
     @Override
-    @SuppressWarnings("unchecked")
     public boolean isUserInRole(String role) {
         Object authorization = getAttribute(HttpContext.AUTHORIZATION);
         return (authorization instanceof Authorization)

Modified: incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java?rev=733017&r1=733016&r2=733017&view=diff
==============================================================================
--- incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
(original)
+++ incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
Fri Jan  9 04:32:24 2009
@@ -35,7 +35,6 @@
 import javax.servlet.http.HttpServletResponseWrapper;
 
 import org.apache.sling.api.SlingHttpServletResponse;
-import org.apache.sling.engine.ResponseUtil;
 import org.apache.sling.engine.impl.request.RequestData;
 import org.apache.sling.engine.servlets.ErrorHandler;
 
@@ -297,7 +296,7 @@
             super.setCharacterEncoding(charset);
         }
     }
-    
+
     public void setDateHeader(String name, long date) {
         this.registerHeader(name, toDateString(date), false);
         super.setDateHeader(name, date);

Modified: incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/RequestData.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/RequestData.java?rev=733017&r1=733016&r2=733017&view=diff
==============================================================================
--- incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/RequestData.java
(original)
+++ incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/RequestData.java
Fri Jan  9 04:32:24 2009
@@ -143,7 +143,8 @@
 
         // resolve the resource
         requestProgressTracker.startTimer("ResourceResolution");
-        Resource resource = resourceResolver.resolve(getServletRequest());
+        final HttpServletRequest request = getServletRequest();
+        Resource resource = resourceResolver.resolve(request, request.getPathInfo());
         requestProgressTracker.logTimer("ResourceResolution",
             "URI={0} resolves to Resource={1}",
             getServletRequest().getRequestURI(), resource);
@@ -514,20 +515,20 @@
             currentContentData = contentDataStack.removeLast();
 
             if (contentDataStack.isEmpty()) {
-                
+
                 // remove the request attributes if the stack is empty now
                 servletRequest.removeAttribute(SlingConstants.ATTR_REQUEST_CONTENT);
                 servletRequest.removeAttribute(SlingConstants.ATTR_REQUEST_SERVLET);
-                
+
             } else {
-                
+
                 // otherwise reset the attributes of the including content data
                 ContentData including = contentDataStack.getLast();
                 servletRequest.setAttribute(ATTR_REQUEST_CONTENT,
                     including.getResource());
                 servletRequest.setAttribute(ATTR_REQUEST_SERVLET,
                     including.getServlet());
-                
+
             }
 
         } else {



Mime
View raw message