Misc code clean-up.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 5 Sep 2010 21:08:42 +0000 (21:08 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 5 Sep 2010 21:08:42 +0000 (21:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@992895 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/AsyncContextImpl.java

index 06981a8..22c5320 100644 (file)
@@ -217,7 +217,7 @@ public class AsyncContextImpl implements AsyncContext {
                 }
             }
         } else {
-            throw new IllegalStateException("Dispatch not allowed. Invalid state:"+state.get());
+            throw new IllegalStateException("Start not allowed. Invalid state:"+state.get());
         }
     }
     
@@ -298,10 +298,6 @@ public class AsyncContextImpl implements AsyncContext {
         return (state.get()==AsyncState.NOT_STARTED);
     }
 
-    public void setCompleted() {
-        this.state.set(AsyncState.NOT_STARTED);
-    }
-    
     public void doInternalDispatch() throws ServletException, IOException {
         if (this.state.compareAndSet(AsyncState.TIMING_OUT,
                 AsyncState.TIMING_OUT_NEED_COMPLETE)) {
@@ -408,7 +404,8 @@ public class AsyncContextImpl implements AsyncContext {
     @Override
     public void setTimeout(long timeout) {
         this.timeout = timeout;
-        request.getCoyoteRequest().action(ActionCode.ACTION_ASYNC_SETTIMEOUT,new Long(timeout));
+        request.getCoyoteRequest().action(ActionCode.ACTION_ASYNC_SETTIMEOUT,
+                Long.valueOf(timeout));
     }
     
     public void setTimeoutState() {