Upgraded HttpCore to version 4.2.2

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpasyncclient/trunk@1388785 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java b/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
index 7b9480e..3eb78c0 100644
--- a/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
+++ b/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
@@ -28,16 +28,13 @@
 package org.apache.http.impl.nio.client;
 
 import java.io.IOException;
-import java.lang.reflect.Method;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.ConnectionClosedException;
 import org.apache.http.HttpException;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.NHttpClientConnection;
-import org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler;
 import org.apache.http.nio.protocol.HttpAsyncRequestExecutor;
 
 class LoggingAsyncRequestExecutor extends HttpAsyncRequestExecutor {
@@ -131,23 +128,4 @@
         super.timeout(conn);
     }
 
-    @Override
-    public void endOfInput(NHttpClientConnection conn) throws IOException {
-        ///
-        /// TODO: remove when fix for HTTPASYNC-21 is available in HttpCore stable release
-        ///
-        HttpAsyncRequestExecutionHandler<?> handler = (HttpAsyncRequestExecutionHandler<?>) conn.getContext().getAttribute(HTTP_HANDLER);
-        Object state = conn.getContext().getAttribute("http.nio.http-exchange-state");
-        try {
-            Method m1 = state.getClass().getDeclaredMethod("getRequestState");
-            m1.setAccessible(true);
-            Object obj = m1.invoke(state);
-            if (!obj.toString().equals("READY")) {
-                handler.failed(new ConnectionClosedException("Connection closed"));
-            }
-        } catch (Exception ex) {
-        }
-        super.endOfInput(conn);
-    }
-
 }
diff --git a/pom.xml b/pom.xml
index df3ed90..1160696 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,7 +71,7 @@
     <maven.compile.target>1.5</maven.compile.target>
     <maven.compile.optimize>true</maven.compile.optimize>
     <maven.compile.deprecation>true</maven.compile.deprecation>
-    <httpcore.version>4.2.1</httpcore.version>
+    <httpcore.version>4.2.2</httpcore.version>
     <httpclient.version>4.2.1</httpclient.version>
     <commons-logging.version>1.1.1</commons-logging.version>
     <!-- Note IO 2.3+ requires Java 6 -->