incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r609907 - in /incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core: impl/ impl/filter/ impl/request/ servlets/
Date Tue, 08 Jan 2008 08:47:21 GMT
Author: cziegeler
Date: Tue Jan  8 00:47:21 2008
New Revision: 609907

URL: http://svn.apache.org/viewvc?rev=609907&view=rev
Log:
Clean up java docs a little bit.

Modified:
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/LocaleResolverFilter.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/SlingComponentFilterChain.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/RequestData.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestProgressTracker.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/AbstractServiceReferenceConfig.java
    incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/ErrorHandler.java

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java?rev=609907&r1=609906&r2=609907&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingMainServlet.java
Tue Jan  8 00:47:21 2008
@@ -46,7 +46,6 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.sling.api.HttpStatusCodeException;
-import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.SlingException;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.SlingHttpServletResponse;
@@ -136,7 +135,7 @@
 
     /** @scr.reference cardinality="0..1" policy="dynamic" */
     private ErrorHandler errorHandler;
-    
+
     private SlingFilterChainHelper requestFilterChain = new SlingFilterChainHelper();
 
     private SlingFilterChainHelper innerFilterChain = new SlingFilterChainHelper();
@@ -203,7 +202,7 @@
                     hsce.getMessage(), clientRequest, clientResponse);
 
             } catch (Throwable t) {
-                
+
                 // if we have request data and a non-null active servlet name
                 // we assume, that this is the name of the causing servlet
                 if (requestData != null
@@ -211,7 +210,7 @@
                     clientRequest.setAttribute(ERROR_SERVLET_NAME,
                         requestData.getActiveServletName());
                 }
-                
+
                 getErrorHandler().handleError(t, clientRequest, clientResponse);
 
             } finally {
@@ -288,7 +287,7 @@
     }
 
     // ---------- ErrorHandler interface (default implementation) --------------
-    
+
     // reset the response, set the status and write a simple message
     public void handleError(int status, String message,
             HttpServletRequest request, HttpServletResponse response)
@@ -299,12 +298,12 @@
         } else {
             message = status + " - " + message;
         }
-        
+
         if (response.isCommitted()) {
             log.error("handleError: Response already committed; cannot send error "
                 + status + message);
         } else {
-        
+
             // error situation
             String servletName = (String) request.getAttribute(ERROR_SERVLET_NAME);
             String requestURI = (String) request.getAttribute(ERROR_REQUEST_URI);
@@ -314,11 +313,11 @@
 
             // reset anything in the response first
             response.reset();
-            
+
             // set the status, content type and encoding
             response.setStatus(status);
             response.setContentType("text/html; charset=UTF-8");
-            
+
             PrintWriter pw = response.getWriter();
             pw.println("<html><head><title>");
             pw.println(message);
@@ -348,7 +347,7 @@
                 "handleError: Response already committed; cannot send error",
                 throwable);
         } else {
-        
+
             // error situation
             String servletName = (String) request.getAttribute(ERROR_SERVLET_NAME);
             String requestURI = (String) request.getAttribute(ERROR_REQUEST_URI);
@@ -358,7 +357,7 @@
 
             // reset anything in the response first
             response.reset();
-            
+
             // set the status, content type and encoding
             response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
             response.setContentType("text/html; charset=UTF-8");
@@ -378,13 +377,13 @@
             pw.println("</pre><hr /><address>");
             pw.println(getServerInfo());
             pw.println("</address></body></html>");
-            
+
             // commit the response
             response.flushBuffer();
 
         }
     }
-    
+
     // ---------- Internal helper ----------------------------------------------
 
     public String getServerInfo() {

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/LocaleResolverFilter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/LocaleResolverFilter.java?rev=609907&r1=609906&r2=609907&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/LocaleResolverFilter.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/LocaleResolverFilter.java
Tue Jan  8 00:47:21 2008
@@ -94,7 +94,8 @@
     // ---------- SCR Integration ----------------------------------------------
 
     protected void activate(org.osgi.service.component.ComponentContext context) {
-        Dictionary configuration = context.getProperties();
+        @SuppressWarnings("unchecked")
+        Dictionary<String, Object> configuration = context.getProperties();
         String localeString = (String) configuration.get(PAR_DEFAULT_LOCALE);
         this.defaultLocale = this.toLocale(localeString);
     }

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/SlingComponentFilterChain.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/SlingComponentFilterChain.java?rev=609907&r1=609906&r2=609907&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/SlingComponentFilterChain.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/filter/SlingComponentFilterChain.java
Tue Jan  8 00:47:21 2008
@@ -30,7 +30,7 @@
 /**
  * The <code>SlingComponentFilterChain</code> implements the filter chain for
  * component scoped filters. It is used by the
- * {@link SlingMainServlet#processRequest(RenderRequest, ComponentResponse)}
+ * {@link org.apache.sling.core.impl.SlingMainServlet#processRequest(SlingHttpServletRequest,
SlingHttpServletResponse)}
  * method to dispatch component processing.
  */
 public class SlingComponentFilterChain extends AbstractSlingFilterChain {

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/RequestData.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/RequestData.java?rev=609907&r1=609906&r2=609907&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/RequestData.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/RequestData.java
Tue Jan  8 00:47:21 2008
@@ -71,7 +71,7 @@
  * The <code>RequestData</code> class provides access to objects which are set
  * on a Servlet Request wide basis such as the repository session, the
  * persistence manager, etc.
- * 
+ *
  * @see ContentData
  */
 public class RequestData implements BufferProvider {
@@ -110,7 +110,7 @@
 
     /** the stack of ContentData objects */
     private LinkedList<ContentData> contentDataStack;
-    
+
     /**
      * the number of servlets called by
      * {@link #service(SlingHttpServletRequest, SlingHttpServletResponse)}
@@ -119,7 +119,7 @@
 
     /**
      * The name of the currently active serlvet.
-     * 
+     *
      * @see #setActiveServletName(String)
      * @see #getActiveServletName()
      */
@@ -244,9 +244,8 @@
 
     /**
      * Unwraps the SlingHttpServletRequest to a SlingHttpServletRequestImpl
-     * 
+     *
      * @param request
-     * @return
      * @throws SlingException
      */
     public static SlingHttpServletRequestImpl unwrap(
@@ -291,9 +290,8 @@
 
     /**
      * Unwraps a SlingHttpServletResponse to a SlingHttpServletResponseImpl
-     * 
+     *
      * @param response
-     * @return
      * @throws SlingException
      */
     public static SlingHttpServletResponseImpl unwrap(
@@ -367,7 +365,7 @@
         // and unwrapped component response
         return null;
     }
-    
+
     /**
      * Helper method to call the servlet for the current content data. If the
      * current content data has no servlet, <em>NOT_FOUND</em> (404) error is
@@ -383,7 +381,7 @@
      * servlet terminates normally. In case of a Throwable, the active servlet
      * name is not reset and indicates which servlet caused the potential abort
      * of the request.
-     * 
+     *
      * @param request The request object for the service method
      * @param response The response object for the service method
      * @throws IOException May be thrown by the servlet's service method

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java?rev=609907&r1=609906&r2=609907&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestPathInfo.java
Tue Jan  8 00:47:21 2008
@@ -30,7 +30,7 @@
  * not used to locate the Resource, and we split that part in different
  * subparts: selectors, extension and suffix.
  *
- * @see MicroslingRequestPathInfoTest for a number of examples.
+ * @see SlingRequestPathInfoTest for a number of examples.
  */
 public class SlingRequestPathInfo implements RequestPathInfo {
 

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestProgressTracker.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestProgressTracker.java?rev=609907&r1=609906&r2=609907&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestProgressTracker.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestProgressTracker.java
Tue Jan  8 00:47:21 2008
@@ -38,12 +38,12 @@
  * The following functionality is provided:
  * <ol>
  * <li>Track the progress of request processing through the
- * {@link #log(String)} and {@link #log(String, String)} methods.
+ * {@link #log(String)} and {@link #log(String, Object...)} methods.
  * <li>Ability to measure and track processing times of parts of request
  * processing through the {@link #startTimer(String)} and
- * {@link #checkTimer(String)} methods.
+ * {@link #logTimer(String)} methods.
  * <li>Dumping the recording messages through the
- * {@link #dumpText(PrintWriter)} method.
+ * {@link #dump(PrintWriter)} method.
  * <li>Resetting the tracker through the {@link #reset()} method.
  * </ol>
  * <p>

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/AbstractServiceReferenceConfig.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/AbstractServiceReferenceConfig.java?rev=609907&r1=609906&r2=609907&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/AbstractServiceReferenceConfig.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/AbstractServiceReferenceConfig.java
Tue Jan  8 00:47:21 2008
@@ -30,7 +30,6 @@
 
 import javax.servlet.ServletContext;
 
-import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 
 /**
@@ -72,7 +71,7 @@
 
     /**
      * Sets up this base configuration object.
-     * 
+     *
      * @param servletContext The <code>ServletContext</code> attached to this
      *            configuration.
      * @param reference The service reference providing the initialization
@@ -113,7 +112,7 @@
     /**
      * Looks for a name value in the service reference properties. See the
      * class comment at the top for the list of properties checked by this
-     * method. 
+     * method.
      */
     public static String getName(ServiceReference reference) {
         String servletName = null;

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/ErrorHandler.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/ErrorHandler.java?rev=609907&r1=609906&r2=609907&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/ErrorHandler.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/servlets/ErrorHandler.java
Tue Jan  8 00:47:21 2008
@@ -23,7 +23,6 @@
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
 
 /**
  * The <code>ErrorHandler</code> defines the interface of the service used by
@@ -38,7 +37,7 @@
      * <p>
      * If the response has already been committed, an error message should be
      * logged but no further processing should take place.
-     * 
+     *
      * @param status The HTTP status code to set
      * @param message An optional message to write to the response. This message
      *            may be <code>null</code>.
@@ -56,7 +55,7 @@
      * <p>
      * If the response has already been committed, an error message should be
      * logged but no further processing should take place.
-     * 
+     *
      * @param throwable The <code>Throwable</code> causing this method to be
      *            called.
      * @param request The request object providing more information on the



Mime
View raw message