httplite: cleanup and correct javadoc comments.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1210810 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/httplite/src/main/java/org/apache/felix/httplite/server/Connection.java b/httplite/src/main/java/org/apache/felix/httplite/server/Connection.java
index a5ed792..d5ffcb5 100644
--- a/httplite/src/main/java/org/apache/felix/httplite/server/Connection.java
+++ b/httplite/src/main/java/org/apache/felix/httplite/server/Connection.java
@@ -43,7 +43,13 @@
 **/
 public class Connection
 {
+    /**
+     * Connection timeout
+     */
     public static final int DEFAULT_CONNECTION_TIMEOUT = 10000;
+    /**
+     * Requests per request
+     */
     public static final int DEFAULT_CONNECTION_REQUESTLIMIT = 50;
 
     private final Socket m_socket;
@@ -70,11 +76,11 @@
 
     /**
      * Constructs a connection with the specified inactivity timeout and request limit.
-     * @param server The web server associated with the connection.
      * @param socket The client socket.
      * @param timeout The inactivity timeout of the connection in milliseconds.
      * @param requestLimit The maximum number of consecutive requests.
      * @param resolver resolves a request URI to a client or servlet registration via the HTTP Service.
+     * @param logger logger instance.
      * @throws java.io.IOException If any I/O error occurs.
      */
     public Connection(final Socket socket, final int timeout, final int requestLimit, final ServiceRegistrationResolver resolver, final Logger logger) throws IOException
@@ -169,7 +175,7 @@
                 }
                 m_requestCount++;
 
-                // Keep track of whether we have errored or not,
+                // Keep track of whether we have failed or not,
                 // because we still want to read the bytes to clear
                 // the input stream so we can service more requests.
                 boolean error = false;
@@ -207,8 +213,8 @@
                     response.setConnectionType("close");
                 }
 
-                // We only service GET and/or HEAD requests, so send
-                // a "not implemented" error otherwise.
+                // We do not support OPTIONS method so send
+                // a "not implemented" error in that case.
                 if (!HttpServletRequestImpl.isSupportedMethod(request.getMethod()))
                 {
                     error = true;
@@ -216,7 +222,7 @@
                     response.sendNotImplementedResponse();
                 }
 
-                // Ignore if we have already errored, otherwise send error message
+                // Ignore if we have already failed, otherwise send error message
                 // if an HTTP/1.1 client did not include HOST header.
                 if (!error && request.getProtocol().equals(HttpConstants.HTTP11_VERSION)
                     && (request.getHeader(HttpConstants.HOST_HEADER) == null))
diff --git a/httplite/src/main/java/org/apache/felix/httplite/server/ThreadPool.java b/httplite/src/main/java/org/apache/felix/httplite/server/ThreadPool.java
index a55f04f..87cadf1 100644
--- a/httplite/src/main/java/org/apache/felix/httplite/server/ThreadPool.java
+++ b/httplite/src/main/java/org/apache/felix/httplite/server/ThreadPool.java
@@ -34,23 +34,27 @@
 **/
 public class ThreadPool
 {
+    /**
+     * Default thread timeout
+     */
     public static final int DEFAULT_THREAD_TIMEOUT = 60000;
-    private int m_threadTimeout;
+    private final int m_threadTimeout;
 
-    private ThreadGroup m_group = new ThreadGroup("ThreadPoolGroup");
+    private final ThreadGroup m_group = new ThreadGroup("ThreadPoolGroup");
     private int m_state;
     private ThreadGate m_shutdownGate;
     private int m_threadName = 0;
     private int m_threadLimit = 0;
     private int m_threadCount = 0;
     private int m_threadAvailable = 0;
-    private List m_connectionList = new ArrayList();
+    private final List m_connectionList = new ArrayList();
     private final Logger m_logger;
 
     /**
      * Constructs a thread pool with the specified thread limit and with
      * the default inactivity timeout.
      * @param threadLimit The maximum number of threads in the pool.
+     * @param logger Logger instance.
     **/
     public ThreadPool(final int threadLimit, final Logger logger)
     {
@@ -62,6 +66,7 @@
      * timeout.
      * @param threadLimit The maximum number of threads in the pool.
      * @param threadTimeout The inactivity timeout for threads in milliseconds.
+     * @param logger Logger instance.
     **/
     public ThreadPool(int threadLimit, int threadTimeout, Logger logger)
     {
diff --git a/httplite/src/main/java/org/apache/felix/httplite/servlet/HttpServletResponseImpl.java b/httplite/src/main/java/org/apache/felix/httplite/servlet/HttpServletResponseImpl.java
index bd2f314..5c7025b 100644
--- a/httplite/src/main/java/org/apache/felix/httplite/servlet/HttpServletResponseImpl.java
+++ b/httplite/src/main/java/org/apache/felix/httplite/servlet/HttpServletResponseImpl.java
@@ -68,8 +68,7 @@
 
     /**
      * Constructs an HTTP response for the specified server and request.
-     * @param server The web server associated with the response.
-     * @param request The HTTP request associated with the response.
+     * @param outputStream The output stream for the client.
     **/
     public HttpServletResponseImpl(OutputStream outputStream)
     {
@@ -652,6 +651,7 @@
      * Build a response given input parameters.
      * 
      * @param code HTTP code
+     * @param headers Map of HTTP headers
      * @param userMessage user message
      * @param htmlStartTag custom HTML document start
      * @return byte array of response.
diff --git a/httplite/src/main/java/org/apache/felix/httplite/servlet/ServletContextImpl.java b/httplite/src/main/java/org/apache/felix/httplite/servlet/ServletContextImpl.java
index 5ee7fac..ad705b3 100644
--- a/httplite/src/main/java/org/apache/felix/httplite/servlet/ServletContextImpl.java
+++ b/httplite/src/main/java/org/apache/felix/httplite/servlet/ServletContextImpl.java
@@ -292,6 +292,9 @@
 	/* (non-Javadoc)
 	 * @see javax.servlet.ServletContext#getContextPath()
 	 */
+	/**
+	 * @return the context path.
+	 */
 	public String getContextPath() {	
 		return m_name;
 	}
diff --git a/httplite/src/main/java/org/apache/felix/httplite/servlet/ServletPrintWriter.java b/httplite/src/main/java/org/apache/felix/httplite/servlet/ServletPrintWriter.java
index f9f26d5..4d98fd2 100644
--- a/httplite/src/main/java/org/apache/felix/httplite/servlet/ServletPrintWriter.java
+++ b/httplite/src/main/java/org/apache/felix/httplite/servlet/ServletPrintWriter.java
@@ -34,7 +34,7 @@
     /**
      * @param outputStream OutputStream
      * @param characterEncoding character encoding
-     * @throws UnknownCharacterException if the character encoding is not supported.
+     * @throws CharConversionException if the character encoding is not supported.
      */
     public ServletPrintWriter(OutputStream outputStream, String characterEncoding) throws CharConversionException
     {