hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1666696 [1/2] - in /httpcomponents/httpcore/trunk: ./ httpcore-nio/ httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/ httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ httpcore-nio/src/main/java/org/apache/http/impl/...
Date Sat, 14 Mar 2015 15:48:56 GMT
Author: olegk
Date: Sat Mar 14 15:48:55 2015
New Revision: 1666696

URL: http://svn.apache.org/r1666696
Log:
Upgrade to Java 1.7

Modified:
    httpcomponents/httpcore/trunk/BUILDING.txt
    httpcomponents/httpcore/trunk/README.txt
    httpcomponents/httpcore/trunk/httpcore-nio/pom.xml
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/HttpServer.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/ServerBootstrap.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultConnectingIOReactor.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultListeningIOReactor.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/RouteSpecificPool.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncClientExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/PipeliningClientExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestRouteSpecificPool.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
    httpcomponents/httpcore/trunk/httpcore/pom.xml
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/HttpServer.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/ServerBootstrap.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/RouteSpecificPool.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/ChainBuilder.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpProcessorBuilder.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/UriPatternMatcher.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ssl/SSLContextBuilder.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ssl/SSLContexts.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/VersionInfo.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/concurrent/TestBasicFuture.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/integration/TestSyncHttp.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestChainBuilder.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestUriPatternMatcher.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java
    httpcomponents/httpcore/trunk/pom.xml

Modified: httpcomponents/httpcore/trunk/BUILDING.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/BUILDING.txt?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/BUILDING.txt (original)
+++ httpcomponents/httpcore/trunk/BUILDING.txt Sat Mar 14 15:48:55 2015
@@ -3,7 +3,7 @@ Building HttpComponents Core
 
 (1) Requisites
 --------------
-JDK 1.6+ is required in order to compile and run HttpCore.
+JDK 1.7+ is required in order to compile and run HttpCore.
 
 HttpCore utilizes Maven as a distribution management and packaging tool.
 Version 3.0.3 or later is required.

Modified: httpcomponents/httpcore/trunk/README.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/README.txt?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/README.txt (original)
+++ httpcomponents/httpcore/trunk/README.txt Sat Mar 14 15:48:55 2015
@@ -11,7 +11,7 @@ For building from source instructions pl
 Dependencies
 ------------
 
-HttpCore requires Java 1.5 compatible runtime.
+HttpCore requires Java 1.7 compatible runtime.
 
 Licensing
 ---------

Modified: httpcomponents/httpcore/trunk/httpcore-nio/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/pom.xml?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/pom.xml (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/pom.xml Sat Mar 14 15:48:55 2015
@@ -86,8 +86,8 @@
           <quiet>true</quiet>
           <source>${maven.compiler.source}</source>
           <links>
-            <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
-            <link>http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/</link>
+            <link>http://docs.oracle.com/javase/7/docs/api/</link>
+            <link>http://hc.apache.org/httpcomponents-core-4.4.x/httpcore/apidocs/</link>
           </links>
         </configuration>
         <reportSets>

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/HttpServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/HttpServer.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/HttpServer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/HttpServer.java Sat Mar 14 15:48:55 2015
@@ -102,7 +102,7 @@ public class HttpServer {
                 return false;
             }
         });
-        this.status = new AtomicReference<Status>(Status.READY);
+        this.status = new AtomicReference<>(Status.READY);
     }
 
     public ListenerEndpoint getEndpoint() {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/ServerBootstrap.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/ServerBootstrap.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/ServerBootstrap.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/bootstrap/ServerBootstrap.java Sat Mar 14 15:48:55 2015
@@ -145,7 +145,7 @@ public class ServerBootstrap {
             return this;
         }
         if (responseFirst == null) {
-            responseFirst = new LinkedList<HttpResponseInterceptor>();
+            responseFirst = new LinkedList<>();
         }
         responseFirst.addFirst(itcp);
         return this;
@@ -162,7 +162,7 @@ public class ServerBootstrap {
             return this;
         }
         if (responseLast == null) {
-            responseLast = new LinkedList<HttpResponseInterceptor>();
+            responseLast = new LinkedList<>();
         }
         responseLast.addLast(itcp);
         return this;
@@ -179,7 +179,7 @@ public class ServerBootstrap {
             return this;
         }
         if (requestFirst == null) {
-            requestFirst = new LinkedList<HttpRequestInterceptor>();
+            requestFirst = new LinkedList<>();
         }
         requestFirst.addFirst(itcp);
         return this;
@@ -196,7 +196,7 @@ public class ServerBootstrap {
             return this;
         }
         if (requestLast == null) {
-            requestLast = new LinkedList<HttpRequestInterceptor>();
+            requestLast = new LinkedList<>();
         }
         requestLast.addLast(itcp);
         return this;
@@ -252,7 +252,7 @@ public class ServerBootstrap {
             return this;
         }
         if (handlerMap == null) {
-            handlerMap = new HashMap<String, HttpAsyncRequestHandler<?>>();
+            handlerMap = new HashMap<>();
         }
         handlerMap.put(pattern, handler);
         return this;

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java Sat Mar 14 15:48:55 2015
@@ -81,7 +81,7 @@ public abstract class AbstractMessagePar
         super();
         this.lineParser = lineParser != null ? lineParser : LazyLineParser.INSTANCE;
         this.constraints = constraints != null ? constraints : MessageConstraints.DEFAULT;
-        this.headerBufs = new ArrayList<CharArrayBuffer>();
+        this.headerBufs = new ArrayList<>();
         this.state = READ_HEAD_LINE;
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java Sat Mar 14 15:48:55 2015
@@ -88,7 +88,7 @@ public class ChunkDecoder extends Abstra
         this.endOfChunk = false;
         this.endOfStream = false;
         this.constraints = constraints != null ? constraints : MessageConstraints.DEFAULT;
-        this.trailerBufs = new ArrayList<CharArrayBuffer>();
+        this.trailerBufs = new ArrayList<>();
     }
 
     public ChunkDecoder(

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java Sat Mar 14 15:48:55 2015
@@ -96,9 +96,9 @@ public abstract class AbstractIOReactor
         this.selectTimeout = selectTimeout;
         this.interestOpsQueueing = interestOpsQueueing;
         this.sessions = Collections.synchronizedSet(new HashSet<IOSession>());
-        this.interestOpsQueue = new ConcurrentLinkedQueue<InterestOpEntry>();
-        this.closedSessions = new ConcurrentLinkedQueue<IOSession>();
-        this.newChannels = new ConcurrentLinkedQueue<ChannelEntry>();
+        this.interestOpsQueue = new ConcurrentLinkedQueue<>();
+        this.closedSessions = new ConcurrentLinkedQueue<>();
+        this.newChannels = new ConcurrentLinkedQueue<>();
         try {
             this.selector = Selector.open();
         } catch (final IOException ex) {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java Sat Mar 14 15:48:55 2015
@@ -142,7 +142,7 @@ public abstract class AbstractMultiworke
         } else {
             this.threadFactory = new DefaultThreadFactory();
         }
-        this.auditLog = new ArrayList<ExceptionEvent>();
+        this.auditLog = new ArrayList<>();
         this.workerCount = this.config.getIoThreadCount();
         this.dispatchers = new BaseIOReactor[workerCount];
         this.workers = new Worker[workerCount];
@@ -174,7 +174,7 @@ public abstract class AbstractMultiworke
      */
     public List<ExceptionEvent> getAuditLog() {
         synchronized (this.auditLog) {
-            return new ArrayList<ExceptionEvent>(this.auditLog);
+            return new ArrayList<>(this.auditLog);
         }
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java Sat Mar 14 15:48:55 2015
@@ -85,7 +85,7 @@ public class BaseIOReactor extends Abstr
     public BaseIOReactor(
             final long selectTimeout, final boolean interestOpsQueueing) throws IOReactorException {
         super(selectTimeout, interestOpsQueueing);
-        this.bufferingSessions = new HashSet<IOSession>();
+        this.bufferingSessions = new HashSet<>();
         this.timeoutCheckInterval = selectTimeout;
         this.lastTimeoutCheck = System.currentTimeMillis();
     }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultConnectingIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultConnectingIOReactor.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultConnectingIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultConnectingIOReactor.java Sat Mar 14 15:48:55 2015
@@ -77,7 +77,7 @@ public class DefaultConnectingIOReactor
             final IOReactorConfig config,
             final ThreadFactory threadFactory) throws IOReactorException {
         super(config, threadFactory);
-        this.requestQueue = new ConcurrentLinkedQueue<SessionRequestImpl>();
+        this.requestQueue = new ConcurrentLinkedQueue<>();
         this.lastTimeoutCheck = System.currentTimeMillis();
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultListeningIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultListeningIOReactor.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultListeningIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/DefaultListeningIOReactor.java Sat Mar 14 15:48:55 2015
@@ -80,9 +80,9 @@ public class DefaultListeningIOReactor e
             final IOReactorConfig config,
             final ThreadFactory threadFactory) throws IOReactorException {
         super(config, threadFactory);
-        this.requestQueue = new ConcurrentLinkedQueue<ListenerEndpointImpl>();
+        this.requestQueue = new ConcurrentLinkedQueue<>();
         this.endpoints = Collections.synchronizedSet(new HashSet<ListenerEndpointImpl>());
-        this.pausedEndpoints = new HashSet<SocketAddress>();
+        this.pausedEndpoints = new HashSet<>();
     }
 
     /**
@@ -247,7 +247,7 @@ public class DefaultListeningIOReactor e
 
     @Override
     public Set<ListenerEndpoint> getEndpoints() {
-        final Set<ListenerEndpoint> set = new HashSet<ListenerEndpoint>();
+        final Set<ListenerEndpoint> set = new HashSet<>();
         synchronized (this.endpoints) {
             final Iterator<ListenerEndpointImpl> it = this.endpoints.iterator();
             while (it.hasNext()) {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java Sat Mar 14 15:48:55 2015
@@ -108,13 +108,13 @@ public abstract class AbstractNIOConnPoo
         this.connFactory = connFactory;
         this.addressResolver = addressResolver;
         this.sessionRequestCallback = new InternalSessionRequestCallback();
-        this.routeToPool = new HashMap<T, RouteSpecificPool<T, C, E>>();
-        this.leasingRequests = new LinkedList<LeaseRequest<T, C, E>>();
-        this.pending = new HashSet<SessionRequest>();
-        this.leased = new HashSet<E>();
-        this.available = new LinkedList<E>();
-        this.completedRequests = new ConcurrentLinkedQueue<LeaseRequest<T, C, E>>();
-        this.maxPerRoute = new HashMap<T, Integer>();
+        this.routeToPool = new HashMap<>();
+        this.leasingRequests = new LinkedList<>();
+        this.pending = new HashSet<>();
+        this.leased = new HashSet<>();
+        this.available = new LinkedList<>();
+        this.completedRequests = new ConcurrentLinkedQueue<>();
+        this.maxPerRoute = new HashMap<>();
         this.lock = new ReentrantLock();
         this.isShutDown = new AtomicBoolean(false);
         this.defaultMaxPerRoute = defaultMaxPerRoute;
@@ -207,11 +207,11 @@ public abstract class AbstractNIOConnPoo
         Args.notNull(route, "Route");
         Args.notNull(tunit, "Time unit");
         Asserts.check(!this.isShutDown.get(), "Connection pool shut down");
-        final BasicFuture<E> future = new BasicFuture<E>(callback);
+        final BasicFuture<E> future = new BasicFuture<>(callback);
         this.lock.lock();
         try {
             final long timeout = connectTimeout > 0 ? tunit.toMillis(connectTimeout) : 0;
-            final LeaseRequest<T, C, E> request = new LeaseRequest<T, C, E>(route, state, timeout, leaseTimeout, future);
+            final LeaseRequest<T, C, E> request = new LeaseRequest<>(route, state, timeout, leaseTimeout, future);
             final boolean completed = processPendingRequest(request);
             if (!request.isDone() && !completed) {
                 this.leasingRequests.add(request);
@@ -617,7 +617,7 @@ public abstract class AbstractNIOConnPoo
     public Set<T> getRoutes() {
         this.lock.lock();
         try {
-            return new HashSet<T>(routeToPool.keySet());
+            return new HashSet<>(routeToPool.keySet());
         } finally {
             this.lock.unlock();
         }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/RouteSpecificPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/RouteSpecificPool.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/RouteSpecificPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/pool/RouteSpecificPool.java Sat Mar 14 15:48:55 2015
@@ -52,9 +52,9 @@ abstract class RouteSpecificPool<T, C, E
     RouteSpecificPool(final T route) {
         super();
         this.route = route;
-        this.leased = new HashSet<E>();
-        this.available = new LinkedList<E>();
-        this.pending = new HashMap<SessionRequest, BasicFuture<E>>();
+        this.leased = new HashSet<>();
+        this.available = new LinkedList<>();
+        this.pending = new HashMap<>();
     }
 
     public T getRoute() {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncClientExchangeHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncClientExchangeHandler.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncClientExchangeHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncClientExchangeHandler.java Sat Mar 14 15:48:55 2015
@@ -90,7 +90,7 @@ public class BasicAsyncClientExchangeHan
         super();
         this.requestProducer = Args.notNull(requestProducer, "Request producer");
         this.responseConsumer = Args.notNull(responseConsumer, "Response consumer");
-        this.future = new BasicFuture<T>(callback);
+        this.future = new BasicFuture<>(callback);
         this.localContext = Args.notNull(localContext, "HTTP context");
         this.conn = Args.notNull(conn, "HTTP connection");
         this.httppocessor = Args.notNull(httppocessor, "HTTP processor");

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java Sat Mar 14 15:48:55 2015
@@ -127,7 +127,7 @@ public class HttpAsyncRequester {
         Args.notNull(responseConsumer, "HTTP response consumer");
         Args.notNull(conn, "HTTP connection");
         Args.notNull(context, "HTTP context");
-        final BasicAsyncClientExchangeHandler<T> handler = new BasicAsyncClientExchangeHandler<T>(
+        final BasicAsyncClientExchangeHandler<T> handler = new BasicAsyncClientExchangeHandler<>(
                 requestProducer, responseConsumer, callback, context, conn,
                 this.httpprocessor, this.connReuseStrategy);
         initExection(handler, conn);
@@ -205,9 +205,9 @@ public class HttpAsyncRequester {
         Args.notNull(responseConsumer, "HTTP response consumer");
         Args.notNull(connPool, "HTTP connection pool");
         Args.notNull(context, "HTTP context");
-        final BasicFuture<T> future = new BasicFuture<T>(callback);
+        final BasicFuture<T> future = new BasicFuture<>(callback);
         final HttpHost target = requestProducer.getTarget();
-        connPool.lease(target, null, new ConnRequestCallback<T, E>(
+        connPool.lease(target, null, new ConnRequestCallback<>(
                 future, requestProducer, responseConsumer, connPool, context));
         return future;
     }
@@ -239,8 +239,8 @@ public class HttpAsyncRequester {
         Args.notEmpty(responseConsumers, "Response consumer list");
         Args.notNull(connPool, "HTTP connection pool");
         Args.notNull(context, "HTTP context");
-        final BasicFuture<List<T>> future = new BasicFuture<List<T>>(callback);
-        connPool.lease(target, null, new ConnPipelinedRequestCallback<T, E>(
+        final BasicFuture<List<T>> future = new BasicFuture<>(callback);
+        connPool.lease(target, null, new ConnPipelinedRequestCallback<>(
                 future, requestProducers, responseConsumers, connPool, context));
         return future;
     }
@@ -274,11 +274,11 @@ public class HttpAsyncRequester {
         Args.notNull(connPool, "HTTP connection pool");
         Args.notNull(poolEntry, "Pool entry");
         Args.notNull(context, "HTTP context");
-        final BasicFuture<T> future = new BasicFuture<T>(callback);
+        final BasicFuture<T> future = new BasicFuture<>(callback);
         final NHttpClientConnection conn = poolEntry.getConnection();
-        final BasicAsyncClientExchangeHandler<T> handler = new BasicAsyncClientExchangeHandler<T>(
+        final BasicAsyncClientExchangeHandler<T> handler = new BasicAsyncClientExchangeHandler<>(
                 requestProducer, responseConsumer,
-                new RequestExecutionCallback<T, E>(future, poolEntry, connPool),
+                new RequestExecutionCallback<>(future, poolEntry, connPool),
                 context, conn,
                 this.httpprocessor, this.connReuseStrategy);
         initExection(handler, conn);
@@ -314,11 +314,11 @@ public class HttpAsyncRequester {
         Args.notNull(connPool, "HTTP connection pool");
         Args.notNull(poolEntry, "Pool entry");
         Args.notNull(context, "HTTP context");
-        final BasicFuture<List<T>> future = new BasicFuture<List<T>>(callback);
+        final BasicFuture<List<T>> future = new BasicFuture<>(callback);
         final NHttpClientConnection conn = poolEntry.getConnection();
-        final PipeliningClientExchangeHandler<T> handler = new PipeliningClientExchangeHandler<T>(
+        final PipeliningClientExchangeHandler<T> handler = new PipeliningClientExchangeHandler<>(
                 requestProducers, responseConsumers,
-                new RequestExecutionCallback<List<T>, E>(future, poolEntry, connPool),
+                new RequestExecutionCallback<>(future, poolEntry, connPool),
                 context, conn,
                 this.httpprocessor, this.connReuseStrategy);
         initExection(handler, conn);
@@ -390,9 +390,9 @@ public class HttpAsyncRequester {
                 return;
             }
             final NHttpClientConnection conn = result.getConnection();
-            final BasicAsyncClientExchangeHandler<T> handler = new BasicAsyncClientExchangeHandler<T>(
+            final BasicAsyncClientExchangeHandler<T> handler = new BasicAsyncClientExchangeHandler<>(
                     this.requestProducer, this.responseConsumer,
-                    new RequestExecutionCallback<T, E>(this.requestFuture, result, this.connPool),
+                    new RequestExecutionCallback<>(this.requestFuture, result, this.connPool),
                     this.context, conn, httpprocessor, connReuseStrategy);
             initExection(handler, conn);
         }
@@ -459,9 +459,9 @@ public class HttpAsyncRequester {
                 return;
             }
             final NHttpClientConnection conn = result.getConnection();
-            final PipeliningClientExchangeHandler<T> handler = new PipeliningClientExchangeHandler<T>(
+            final PipeliningClientExchangeHandler<T> handler = new PipeliningClientExchangeHandler<>(
                     this.requestProducers, this.responseConsumers,
-                    new RequestExecutionCallback<List<T>, E>(this.requestFuture, result, this.connPool),
+                    new RequestExecutionCallback<>(this.requestFuture, result, this.connPool),
                     this.context, conn, httpprocessor, connReuseStrategy);
             initExection(handler, conn);
         }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java Sat Mar 14 15:48:55 2015
@@ -837,7 +837,7 @@ public class HttpAsyncService implements
 
         State() {
             super();
-            this.pipeline = new ConcurrentLinkedQueue<PipelineEntry>();
+            this.pipeline = new ConcurrentLinkedQueue<>();
             this.requestState = MessageState.READY;
             this.responseState = MessageState.READY;
         }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/PipeliningClientExchangeHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/PipeliningClientExchangeHandler.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/PipeliningClientExchangeHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/PipeliningClientExchangeHandler.java Sat Mar 14 15:48:55 2015
@@ -104,19 +104,19 @@ public class PipeliningClientExchangeHan
         Args.notEmpty(responseConsumers, "Response consumer list");
         Args.check(requestProducers.size() == responseConsumers.size(),
                 "Number of request producers does not match that of response consumers");
-        this.requestProducerQueue = new ConcurrentLinkedQueue<HttpAsyncRequestProducer>(requestProducers);
-        this.responseConsumerQueue = new ConcurrentLinkedQueue<HttpAsyncResponseConsumer<T>>(responseConsumers);
-        this.requestQueue = new ConcurrentLinkedQueue<HttpRequest>();
-        this.resultQueue = new ConcurrentLinkedQueue<T>();
-        this.future = new BasicFuture<List<T>>(callback);
+        this.requestProducerQueue = new ConcurrentLinkedQueue<>(requestProducers);
+        this.responseConsumerQueue = new ConcurrentLinkedQueue<>(responseConsumers);
+        this.requestQueue = new ConcurrentLinkedQueue<>();
+        this.resultQueue = new ConcurrentLinkedQueue<>();
+        this.future = new BasicFuture<>(callback);
         this.localContext = Args.notNull(localContext, "HTTP context");
         this.conn = Args.notNull(conn, "HTTP connection");
         this.httppocessor = Args.notNull(httppocessor, "HTTP processor");
         this.connReuseStrategy = connReuseStrategy != null ? connReuseStrategy :
             DefaultConnectionReuseStrategy.INSTANCE;
         this.localContext.setAttribute(HttpCoreContext.HTTP_CONNECTION, this.conn);
-        this.requestProducerRef = new AtomicReference<HttpAsyncRequestProducer>(null);
-        this.responseConsumerRef = new AtomicReference<HttpAsyncResponseConsumer<T>>(null);
+        this.requestProducerRef = new AtomicReference<>(null);
+        this.responseConsumerRef = new AtomicReference<>(null);
         this.keepAlive = new AtomicBoolean(false);
         this.closed = new AtomicBoolean(false);
     }
@@ -254,7 +254,7 @@ public class PipeliningClientExchangeHan
                 }
             }
             if (!this.future.isDone() && this.responseConsumerQueue.isEmpty()) {
-                this.future.completed(new ArrayList<T>(this.resultQueue));
+                this.future.completed(new ArrayList<>(this.resultQueue));
                 this.resultQueue.clear();
             }
         } catch (final RuntimeException ex) {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java Sat Mar 14 15:48:55 2015
@@ -472,7 +472,7 @@ public class TestDefaultNHttpClientConne
         Mockito.when(session.channel()).thenReturn(channel);
         Mockito.when(session.getEventMask()).thenReturn(SelectionKey.OP_READ);
 
-        final LinkedList<HttpResponse> responses = new LinkedList<HttpResponse>();
+        final LinkedList<HttpResponse> responses = new LinkedList<>();
 
         Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when(
             handler).responseReceived(Mockito.<NHttpClientConnection>any());
@@ -517,7 +517,7 @@ public class TestDefaultNHttpClientConne
         Mockito.when(session.channel()).thenReturn(channel);
         Mockito.when(session.getEventMask()).thenReturn(SelectionKey.OP_READ);
 
-        final LinkedList<HttpResponse> responses = new LinkedList<HttpResponse>();
+        final LinkedList<HttpResponse> responses = new LinkedList<>();
 
         Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when(
             handler).responseReceived(Mockito.<NHttpClientConnection>any());
@@ -569,7 +569,7 @@ public class TestDefaultNHttpClientConne
         Mockito.when(session.channel()).thenReturn(channel);
         Mockito.when(session.getEventMask()).thenReturn(SelectionKey.OP_READ);
 
-        final LinkedList<HttpResponse> responses = new LinkedList<HttpResponse>();
+        final LinkedList<HttpResponse> responses = new LinkedList<>();
 
         Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when(
             handler).responseReceived(Mockito.<NHttpClientConnection>any());
@@ -607,7 +607,7 @@ public class TestDefaultNHttpClientConne
         Mockito.when(session.channel()).thenReturn(channel);
         Mockito.when(session.getEventMask()).thenReturn(SelectionKey.OP_READ);
 
-        final LinkedList<HttpResponse> responses = new LinkedList<HttpResponse>();
+        final LinkedList<HttpResponse> responses = new LinkedList<>();
 
         Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when(
             handler).responseReceived(Mockito.<NHttpClientConnection>any());

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java Sat Mar 14 15:48:55 2015
@@ -458,7 +458,7 @@ public class TestDefaultNHttpServerConne
         Mockito.when(session.channel()).thenReturn(channel);
         Mockito.when(session.getEventMask()).thenReturn(SelectionKey.OP_READ);
 
-        final LinkedList<HttpRequest> requests = new LinkedList<HttpRequest>();
+        final LinkedList<HttpRequest> requests = new LinkedList<>();
 
         Mockito.doAnswer(new RequestCapturingAnswer(requests)).when(
             handler).requestReceived(Mockito.<NHttpServerConnection>any());
@@ -504,7 +504,7 @@ public class TestDefaultNHttpServerConne
         Mockito.when(session.channel()).thenReturn(channel);
         Mockito.when(session.getEventMask()).thenReturn(SelectionKey.OP_READ);
 
-        final LinkedList<HttpRequest> requests = new LinkedList<HttpRequest>();
+        final LinkedList<HttpRequest> requests = new LinkedList<>();
 
         Mockito.doAnswer(new RequestCapturingAnswer(requests)).when(
             handler).requestReceived(Mockito.<NHttpServerConnection>any());
@@ -557,7 +557,7 @@ public class TestDefaultNHttpServerConne
         Mockito.when(session.channel()).thenReturn(channel);
         Mockito.when(session.getEventMask()).thenReturn(SelectionKey.OP_READ);
 
-        final LinkedList<HttpRequest> requests = new LinkedList<HttpRequest>();
+        final LinkedList<HttpRequest> requests = new LinkedList<>();
 
         Mockito.doAnswer(new RequestCapturingAnswer(requests)).when(
             handler).requestReceived(Mockito.<NHttpServerConnection>any());
@@ -594,7 +594,7 @@ public class TestDefaultNHttpServerConne
         Mockito.when(session.channel()).thenReturn(channel);
         Mockito.when(session.getEventMask()).thenReturn(SelectionKey.OP_READ);
 
-        final LinkedList<HttpRequest> requests = new LinkedList<HttpRequest>();
+        final LinkedList<HttpRequest> requests = new LinkedList<>();
 
         Mockito.doAnswer(new RequestCapturingAnswer(requests)).when(
             handler).requestReceived(Mockito.<NHttpServerConnection>any());

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java Sat Mar 14 15:48:55 2015
@@ -152,7 +152,7 @@ public class TestDefaultIOReactors exten
 
         Assert.assertEquals("Test server status", IOReactorStatus.ACTIVE, this.server.getStatus());
 
-        final Queue<Future<BasicNIOPoolEntry>> queue = new LinkedList<Future<BasicNIOPoolEntry>>();
+        final Queue<Future<BasicNIOPoolEntry>> queue = new LinkedList<>();
         for (int i = 0; i < connNo; i++) {
             queue.add(this.client.lease(target, null));
         }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java Sat Mar 14 15:48:55 2015
@@ -155,7 +155,7 @@ public class TestHttpAsyncHandlers exten
 
         final String expectedPattern = createExpectedString(pattern, count);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest("GET", createRequestUri(pattern, count));
             final Future<HttpResponse> future = this.client.execute(target, request);
@@ -182,7 +182,7 @@ public class TestHttpAsyncHandlers exten
         final String pattern = RndTestPatternGenerator.generateText();
         final int count = RndTestPatternGenerator.generateCount(1000);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest("HEAD", createRequestUri(pattern, count));
             final Future<HttpResponse> future = this.client.execute(target, request);
@@ -211,7 +211,7 @@ public class TestHttpAsyncHandlers exten
 
         final String expectedPattern = createExpectedString(pattern, count);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest(
                     "POST", createRequestUri(pattern, count));
@@ -243,7 +243,7 @@ public class TestHttpAsyncHandlers exten
 
         final String expectedPattern = createExpectedString(pattern, count);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest(
                     "POST", createRequestUri(pattern, count));
@@ -276,7 +276,7 @@ public class TestHttpAsyncHandlers exten
 
         final String expectedPattern = createExpectedString(pattern, count);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest(
                     "POST", createRequestUri(pattern, count), HttpVersion.HTTP_1_0);
@@ -306,7 +306,7 @@ public class TestHttpAsyncHandlers exten
         final String pattern = RndTestPatternGenerator.generateText();
         final int count = RndTestPatternGenerator.generateCount(1000);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest(
                     "POST", createRequestUri(pattern, count));
@@ -407,7 +407,7 @@ public class TestHttpAsyncHandlers exten
 
         final String expectedPattern = createExpectedString(pattern, count);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest(
                     "POST", createRequestUri(pattern, count));
@@ -469,7 +469,7 @@ public class TestHttpAsyncHandlers exten
 
         final HttpRequest[] requests = new HttpRequest[] { request1, request2, request3 };
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (final HttpRequest request : requests) {
             final HttpContext context = new BasicHttpContext();
             final Future<HttpResponse> future = this.client.execute(target, request, context);
@@ -546,7 +546,7 @@ public class TestHttpAsyncHandlers exten
         final String pattern = RndTestPatternGenerator.generateText();
         final int count = RndTestPatternGenerator.generateCount(1000);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest("HEAD", createRequestUri(pattern, count));
             final Future<HttpResponse> future = this.client.execute(target, request);
@@ -611,7 +611,7 @@ public class TestHttpAsyncHandlers exten
 
         final HttpRequest[] requests = new HttpRequest[] { request1, request2, request3 };
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (final HttpRequest request : requests) {
             final HttpContext context = new BasicHttpContext();
             final Future<HttpResponse> future = this.client.execute(target, request, context);
@@ -667,7 +667,7 @@ public class TestHttpAsyncHandlers exten
         final String pattern = RndTestPatternGenerator.generateText();
         final int count = RndTestPatternGenerator.generateCount(1000);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 1; i++) {
             final BasicHttpRequest request = new BasicHttpRequest("GET", createRequestUri(pattern, count));
             final Future<HttpResponse> future = this.client.execute(target, request);
@@ -693,7 +693,7 @@ public class TestHttpAsyncHandlers exten
         final String pattern = RndTestPatternGenerator.generateText();
         final int count = RndTestPatternGenerator.generateCount(1000);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest("GET", createRequestUri(pattern, count));
             final Future<HttpResponse> future = this.client.execute(target, request);
@@ -727,7 +727,7 @@ public class TestHttpAsyncHandlers exten
         this.client.setMaxPerRoute(3);
         this.client.setMaxTotal(3);
 
-        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<Future<HttpResponse>>();
+        final Queue<Future<HttpResponse>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 30; i++) {
             final BasicHttpRequest request = new BasicHttpRequest("GET", "/");
             final Future<HttpResponse> future = this.client.execute(target, request);

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java Sat Mar 14 15:48:55 2015
@@ -167,7 +167,7 @@ public class TestHttpAsyncHandlersPipeli
 
         final String expectedPattern = createExpectedString(pattern, count);
 
-        final Queue<Future<List<HttpResponse>>> queue = new ConcurrentLinkedQueue<Future<List<HttpResponse>>>();
+        final Queue<Future<List<HttpResponse>>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 10; i++) {
             final String requestUri = createRequestUri(pattern, count);
             final Future<List<HttpResponse>> future = this.client.executePipelined(target,
@@ -201,7 +201,7 @@ public class TestHttpAsyncHandlersPipeli
         final String pattern = RndTestPatternGenerator.generateText();
         final int count = RndTestPatternGenerator.generateCount(1000);
 
-        final Queue<Future<List<HttpResponse>>> queue = new ConcurrentLinkedQueue<Future<List<HttpResponse>>>();
+        final Queue<Future<List<HttpResponse>>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 10; i++) {
             final String requestUri = createRequestUri(pattern, count);
             final Future<List<HttpResponse>> future = this.client.executePipelined(target,
@@ -236,7 +236,7 @@ public class TestHttpAsyncHandlersPipeli
 
         final String expectedPattern = createExpectedString(pattern, count);
 
-        final Queue<Future<List<HttpResponse>>> queue = new ConcurrentLinkedQueue<Future<List<HttpResponse>>>();
+        final Queue<Future<List<HttpResponse>>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 10; i++) {
             final String requestUri = createRequestUri(pattern, count);
             final HttpRequest request1 = new BasicHttpRequest("POST", requestUri);
@@ -327,7 +327,7 @@ public class TestHttpAsyncHandlersPipeli
         final String expectedPattern2 = createExpectedString(pattern2, count);
         final String expectedPattern3 = createExpectedString(pattern3, count);
 
-        final Queue<Future<List<HttpResponse>>> queue = new ConcurrentLinkedQueue<Future<List<HttpResponse>>>();
+        final Queue<Future<List<HttpResponse>>> queue = new ConcurrentLinkedQueue<>();
         for (int i = 0; i < 1; i++) {
             final HttpRequest request1 = new BasicHttpRequest("GET", createRequestUri(pattern1, count));
             final HttpRequest request2 = new BasicHttpRequest("POST",
@@ -399,7 +399,7 @@ public class TestHttpAsyncHandlersPipeli
             final HttpAsyncRequestProducer p3 = new BasicAsyncRequestProducer(target, new BasicHttpRequest("GET", "/boom"));
             final HttpAsyncRequestProducer p4 = new BasicAsyncRequestProducer(target, new BasicHttpRequest("GET", "/"));
             final HttpAsyncRequestProducer p5 = new BasicAsyncRequestProducer(target, new BasicHttpRequest("GET", "/"));
-            final List<HttpAsyncRequestProducer> requestProducers = new ArrayList<HttpAsyncRequestProducer>();
+            final List<HttpAsyncRequestProducer> requestProducers = new ArrayList<>();
             requestProducers.add(p1);
             requestProducers.add(p2);
             requestProducers.add(p3);
@@ -411,7 +411,7 @@ public class TestHttpAsyncHandlersPipeli
             final HttpAsyncResponseConsumer<HttpResponse> c3 = new BasicAsyncResponseConsumer();
             final HttpAsyncResponseConsumer<HttpResponse> c4 = new BasicAsyncResponseConsumer();
             final HttpAsyncResponseConsumer<HttpResponse> c5 = new BasicAsyncResponseConsumer();
-            final List<HttpAsyncResponseConsumer<HttpResponse>> responseConsumers = new ArrayList<HttpAsyncResponseConsumer<HttpResponse>>();
+            final List<HttpAsyncResponseConsumer<HttpResponse>> responseConsumers = new ArrayList<>();
             responseConsumers.add(c1);
             responseConsumers.add(c2);
             responseConsumers.add(c3);

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java Sat Mar 14 15:48:55 2015
@@ -139,7 +139,7 @@ public class TestNIOConnPool {
     @Test
     public void testInternalLeaseRequest() throws Exception {
         final LeaseRequest<String, IOSession, LocalPoolEntry> leaseRequest =
-            new LeaseRequest<String, IOSession, LocalPoolEntry>("somehost", null, 0, 0,
+            new LeaseRequest<>("somehost", null, 0, 0,
                     new BasicFuture<LocalPoolEntry>(null));
         Assert.assertEquals("[somehost][null]", leaseRequest.toString());
     }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestRouteSpecificPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestRouteSpecificPool.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestRouteSpecificPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestRouteSpecificPool.java Sat Mar 14 15:48:55 2015
@@ -88,7 +88,7 @@ public class TestRouteSpecificPool {
         final IOSession session = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest.getSession()).thenReturn(session);
-        final BasicFuture<LocalPoolEntry> future = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future = new BasicFuture<>(null);
         pool.addPending(sessionRequest, future);
         Assert.assertEquals(1, pool.getAllocatedCount());
         Assert.assertEquals(0, pool.getAvailableCount());
@@ -113,7 +113,7 @@ public class TestRouteSpecificPool {
     public void testFailedConnect() throws Exception {
         final LocalRoutePool pool = new LocalRoutePool();
         final SessionRequest sessionRequest = Mockito.mock(SessionRequest.class);
-        final BasicFuture<LocalPoolEntry> future = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future = new BasicFuture<>(null);
         pool.addPending(sessionRequest, future);
         Assert.assertEquals(1, pool.getAllocatedCount());
         Assert.assertEquals(0, pool.getAvailableCount());
@@ -138,7 +138,7 @@ public class TestRouteSpecificPool {
     public void testCancelledConnect() throws Exception {
         final LocalRoutePool pool = new LocalRoutePool();
         final SessionRequest sessionRequest = Mockito.mock(SessionRequest.class);
-        final BasicFuture<LocalPoolEntry> future = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future = new BasicFuture<>(null);
         pool.addPending(sessionRequest, future);
         Assert.assertEquals(1, pool.getAllocatedCount());
         Assert.assertEquals(0, pool.getAvailableCount());
@@ -158,7 +158,7 @@ public class TestRouteSpecificPool {
     public void testConnectTimeout() throws Exception {
         final LocalRoutePool pool = new LocalRoutePool();
         final SessionRequest sessionRequest = Mockito.mock(SessionRequest.class);
-        final BasicFuture<LocalPoolEntry> future = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future = new BasicFuture<>(null);
         pool.addPending(sessionRequest, future);
         Assert.assertEquals(1, pool.getAllocatedCount());
         Assert.assertEquals(0, pool.getAvailableCount());
@@ -185,17 +185,17 @@ public class TestRouteSpecificPool {
         final IOSession session1 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest1 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest1.getSession()).thenReturn(session1);
-        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<>(null);
         pool.addPending(sessionRequest1, future1);
         final IOSession session2 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest2 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest2.getSession()).thenReturn(session2);
-        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<>(null);
         pool.addPending(sessionRequest2, future2);
         final IOSession session3 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest3 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest3.getSession()).thenReturn(session3);
-        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<>(null);
         pool.addPending(sessionRequest3, future3);
 
         Assert.assertEquals(3, pool.getAllocatedCount());
@@ -245,17 +245,17 @@ public class TestRouteSpecificPool {
         final IOSession session1 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest1 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest1.getSession()).thenReturn(session1);
-        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<>(null);
         pool.addPending(sessionRequest1, future1);
         final IOSession session2 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest2 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest2.getSession()).thenReturn(session2);
-        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<>(null);
         pool.addPending(sessionRequest2, future2);
         final IOSession session3 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest3 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest3.getSession()).thenReturn(session3);
-        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<>(null);
         pool.addPending(sessionRequest3, future3);
 
         Assert.assertEquals(3, pool.getAllocatedCount());
@@ -296,17 +296,17 @@ public class TestRouteSpecificPool {
         final IOSession session1 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest1 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest1.getSession()).thenReturn(session1);
-        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<>(null);
         pool.addPending(sessionRequest1, future1);
         final IOSession session2 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest2 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest2.getSession()).thenReturn(session2);
-        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<>(null);
         pool.addPending(sessionRequest2, future2);
         final IOSession session3 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest3 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest3.getSession()).thenReturn(session3);
-        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<>(null);
         pool.addPending(sessionRequest3, future3);
 
         final LocalPoolEntry entry1 = pool.createEntry(sessionRequest1, session1);
@@ -358,17 +358,17 @@ public class TestRouteSpecificPool {
         final IOSession session1 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest1 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest1.getSession()).thenReturn(session1);
-        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<>(null);
         pool.addPending(sessionRequest1, future1);
         final IOSession session2 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest2 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest2.getSession()).thenReturn(session2);
-        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<>(null);
         pool.addPending(sessionRequest2, future2);
         final IOSession session3 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest3 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest3.getSession()).thenReturn(session3);
-        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<>(null);
         pool.addPending(sessionRequest3, future3);
 
         Assert.assertEquals(3, pool.getAllocatedCount());
@@ -434,17 +434,17 @@ public class TestRouteSpecificPool {
         final IOSession session1 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest1 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest1.getSession()).thenReturn(session1);
-        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future1 = new BasicFuture<>(null);
         pool.addPending(sessionRequest1, future1);
         final IOSession session2 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest2 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest2.getSession()).thenReturn(session2);
-        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future2 = new BasicFuture<>(null);
         pool.addPending(sessionRequest2, future2);
         final IOSession session3 = Mockito.mock(IOSession.class);
         final SessionRequest sessionRequest3 = Mockito.mock(SessionRequest.class);
         Mockito.when(sessionRequest3.getSession()).thenReturn(session3);
-        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<LocalPoolEntry>(null);
+        final BasicFuture<LocalPoolEntry> future3 = new BasicFuture<>(null);
         pool.addPending(sessionRequest3, future3);
 
         final LocalPoolEntry entry1 = pool.createEntry(sessionRequest1, session1);

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java Sat Mar 14 15:48:55 2015
@@ -69,7 +69,7 @@ public class TestBasicAsyncClientExchang
         this.conn = Mockito.mock(NHttpClientConnection.class);
         this.httpProcessor = Mockito.mock(HttpProcessor.class);
         this.reuseStrategy = Mockito.mock(ConnectionReuseStrategy.class);
-        this.exchangeHandler = new BasicAsyncClientExchangeHandler<Object>(
+        this.exchangeHandler = new BasicAsyncClientExchangeHandler<>(
                 this.requestProducer,
                 this.responseConsumer,
                 null,
@@ -88,7 +88,7 @@ public class TestBasicAsyncClientExchang
     @Test
     public void testInvalidExecution() throws Exception {
         try {
-            new BasicAsyncClientExchangeHandler<Object>(
+            new BasicAsyncClientExchangeHandler<>(
                     null,
                     this.responseConsumer,
                     null,
@@ -100,7 +100,7 @@ public class TestBasicAsyncClientExchang
         } catch (final IllegalArgumentException ex) {
         }
         try {
-            new BasicAsyncClientExchangeHandler<Object>(
+            new BasicAsyncClientExchangeHandler<>(
                     this.requestProducer,
                     null,
                     null,
@@ -112,7 +112,7 @@ public class TestBasicAsyncClientExchang
         } catch (final IllegalArgumentException ex) {
         }
         try {
-            new BasicAsyncClientExchangeHandler<Object>(
+            new BasicAsyncClientExchangeHandler<>(
                     this.requestProducer,
                     this.responseConsumer,
                     null,
@@ -124,7 +124,7 @@ public class TestBasicAsyncClientExchang
         } catch (final IllegalArgumentException ex) {
         }
         try {
-            new BasicAsyncClientExchangeHandler<Object>(
+            new BasicAsyncClientExchangeHandler<>(
                     this.requestProducer,
                     this.responseConsumer,
                     null,
@@ -136,7 +136,7 @@ public class TestBasicAsyncClientExchang
         } catch (final IllegalArgumentException ex) {
         }
         try {
-            new BasicAsyncClientExchangeHandler<Object>(
+            new BasicAsyncClientExchangeHandler<>(
                     this.requestProducer,
                     this.responseConsumer,
                     null,

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java Sat Mar 14 15:48:55 2015
@@ -170,9 +170,9 @@ public class HttpClientNio {
             final HttpContext context,
             final FutureCallback<List<HttpResponse>> callback) {
         final List<HttpAsyncRequestProducer> requestProducers =
-                new ArrayList<HttpAsyncRequestProducer>(requests.size());
+                new ArrayList<>(requests.size());
         final List<HttpAsyncResponseConsumer<HttpResponse>> responseConsumers =
-                new ArrayList<HttpAsyncResponseConsumer<HttpResponse>>(requests.size());
+                new ArrayList<>(requests.size());
         for (HttpRequest request: requests) {
             requestProducers.add(new BasicAsyncRequestProducer(target, request));
             responseConsumers.add(new BasicAsyncResponseConsumer());

Modified: httpcomponents/httpcore/trunk/httpcore/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/pom.xml?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/pom.xml (original)
+++ httpcomponents/httpcore/trunk/httpcore/pom.xml Sat Mar 14 15:48:55 2015
@@ -80,7 +80,7 @@
           <quiet>true</quiet>
           <source>${maven.compiler.source}</source>
           <links>
-            <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
+            <link>http://docs.oracle.com/javase/7/docs/api/</link>
           </links>
         </configuration>
         <reportSets>

Modified: httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java Sat Mar 14 15:48:55 2015
@@ -110,9 +110,7 @@ public class ElementalPoolingHttpGet {
                         System.out.println(EntityUtils.toString(response.getEntity()));
 
                         reusable = connStrategy.keepAlive(response, coreContext);
-                    } catch (IOException ex) {
-                        throw ex;
-                    } catch (HttpException ex) {
+                    } catch (IOException | HttpException ex) {
                         throw ex;
                     } finally {
                         if (reusable) {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java Sat Mar 14 15:48:55 2015
@@ -45,7 +45,7 @@ public final class Registry<I> implement
 
     Registry(final Map<String, I> map) {
         super();
-        this.map = new ConcurrentHashMap<String, I>(map);
+        this.map = new ConcurrentHashMap<>(map);
     }
 
     @Override

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java Sat Mar 14 15:48:55 2015
@@ -45,12 +45,12 @@ public final class RegistryBuilder<I> {
     private final Map<String, I> items;
 
     public static <I> RegistryBuilder<I> create() {
-        return new RegistryBuilder<I>();
+        return new RegistryBuilder<>();
     }
 
     RegistryBuilder() {
         super();
-        this.items = new HashMap<String, I>();
+        this.items = new HashMap<>();
     }
 
     public RegistryBuilder<I> register(final String id, final I item) {
@@ -61,7 +61,7 @@ public final class RegistryBuilder<I> {
     }
 
     public Registry<I> build() {
-        return new Registry<I>(items);
+        return new Registry<>(items);
     }
 
     @Override

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java Sat Mar 14 15:48:55 2015
@@ -386,7 +386,7 @@ public final class ContentType implement
         if (params.length == 0) {
             return this;
         }
-        final Map<String, String> paramMap = new LinkedHashMap<String, String>();
+        final Map<String, String> paramMap = new LinkedHashMap<>();
         if (this.params != null) {
             for (NameValuePair param: this.params) {
                 paramMap.put(param.getName(), param.getValue());
@@ -395,7 +395,7 @@ public final class ContentType implement
         for (NameValuePair param: params) {
             paramMap.put(param.getName(), param.getValue());
         }
-        final List<NameValuePair> newParams = new ArrayList<NameValuePair>(paramMap.size() + 1);
+        final List<NameValuePair> newParams = new ArrayList<>(paramMap.size() + 1);
         if (this.charset != null && !paramMap.containsKey("charset")) {
             newParams.add(new BasicNameValuePair("charset", this.charset.name()));
         }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java Sat Mar 14 15:48:55 2015
@@ -86,7 +86,7 @@ class BHttpConnectionBase implements BHt
                 charencoder);
         this.messageConstraints = messageConstraints;
         this.connMetrics = new HttpConnectionMetricsImpl(inTransportMetrics, outTransportMetrics);
-        this.socketHolder = new AtomicReference<Socket>();
+        this.socketHolder = new AtomicReference<>();
     }
 
     protected void ensureOpen() throws IOException {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/HttpConnectionMetricsImpl.java Sat Mar 14 15:48:55 2015
@@ -133,7 +133,7 @@ public class HttpConnectionMetricsImpl i
 
     public void setMetric(final String metricName, final Object obj) {
         if (this.metricsCache == null) {
-            this.metricsCache = new HashMap<String, Object>();
+            this.metricsCache = new HashMap<>();
         }
         this.metricsCache.put(metricName, obj);
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/HttpServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/HttpServer.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/HttpServer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/HttpServer.java Sat Mar 14 15:48:55 2015
@@ -90,7 +90,7 @@ public class HttpServer {
         this.workerThreads = new ThreadGroup("HTTP-workers");
         this.workerExecutorService = Executors.newCachedThreadPool(
                 new ThreadFactoryImpl("HTTP-worker", this.workerThreads));
-        this.status = new AtomicReference<Status>(Status.READY);
+        this.status = new AtomicReference<>(Status.READY);
     }
 
     public InetAddress getInetAddress() {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/ServerBootstrap.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/ServerBootstrap.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/ServerBootstrap.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/bootstrap/ServerBootstrap.java Sat Mar 14 15:48:55 2015
@@ -145,7 +145,7 @@ public class ServerBootstrap {
             return this;
         }
         if (responseFirst == null) {
-            responseFirst = new LinkedList<HttpResponseInterceptor>();
+            responseFirst = new LinkedList<>();
         }
         responseFirst.addFirst(itcp);
         return this;
@@ -162,7 +162,7 @@ public class ServerBootstrap {
             return this;
         }
         if (responseLast == null) {
-            responseLast = new LinkedList<HttpResponseInterceptor>();
+            responseLast = new LinkedList<>();
         }
         responseLast.addLast(itcp);
         return this;
@@ -179,7 +179,7 @@ public class ServerBootstrap {
             return this;
         }
         if (requestFirst == null) {
-            requestFirst = new LinkedList<HttpRequestInterceptor>();
+            requestFirst = new LinkedList<>();
         }
         requestFirst.addFirst(itcp);
         return this;
@@ -196,7 +196,7 @@ public class ServerBootstrap {
             return this;
         }
         if (requestLast == null) {
-            requestLast = new LinkedList<HttpRequestInterceptor>();
+            requestLast = new LinkedList<>();
         }
         requestLast.addLast(itcp);
         return this;
@@ -252,7 +252,7 @@ public class ServerBootstrap {
             return this;
         }
         if (handlerMap == null) {
-            handlerMap = new HashMap<String, HttpRequestHandler>();
+            handlerMap = new HashMap<>();
         }
         handlerMap.put(pattern, handler);
         return this;

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java Sat Mar 14 15:48:55 2015
@@ -79,7 +79,7 @@ public abstract class AbstractMessagePar
         super();
         this.lineParser = lineParser != null ? lineParser : LazyLineParser.INSTANCE;
         this.messageConstraints = constraints != null ? constraints : MessageConstraints.DEFAULT;
-        this.headerLines = new ArrayList<CharArrayBuffer>();
+        this.headerLines = new ArrayList<>();
         this.state = HEAD_LINE;
     }
 
@@ -111,7 +111,7 @@ public abstract class AbstractMessagePar
             final int maxHeaderCount,
             final int maxLineLen,
             final LineParser lineParser) throws HttpException, IOException {
-        final List<CharArrayBuffer> headerLines = new ArrayList<CharArrayBuffer>();
+        final List<CharArrayBuffer> headerLines = new ArrayList<>();
         return parseHeaders(inbuffer, maxHeaderCount, maxLineLen,
                 lineParser != null ? lineParser : LazyLineParser.INSTANCE, headerLines);
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderValueParser.java Sat Mar 14 15:48:55 2015
@@ -64,7 +64,7 @@ public class BasicHeaderValueParser impl
     public HeaderElement[] parseElements(final CharSequence buffer, final ParserCursor cursor) {
         Args.notNull(buffer, "Char sequence");
         Args.notNull(cursor, "Parser cursor");
-        final List<HeaderElement> elements = new ArrayList<HeaderElement>();
+        final List<HeaderElement> elements = new ArrayList<>();
         while (!cursor.atEnd()) {
             final HeaderElement element = parseHeaderElement(buffer, cursor);
             if (!(element.getName().length() == 0 && element.getValue() == null)) {
@@ -94,7 +94,7 @@ public class BasicHeaderValueParser impl
         Args.notNull(buffer, "Char sequence");
         Args.notNull(cursor, "Parser cursor");
         tokenParser.skipWhiteSpace(buffer, cursor);
-        final List<NameValuePair> params = new ArrayList<NameValuePair>();
+        final List<NameValuePair> params = new ArrayList<>();
         while (!cursor.atEnd()) {
             final NameValuePair param = parseNameValuePair(buffer, cursor);
             params.add(param);

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java Sat Mar 14 15:48:55 2015
@@ -58,7 +58,7 @@ public class HeaderGroup implements Seri
      * Constructor for HeaderGroup.
      */
     public HeaderGroup() {
-        this.headers = new ArrayList<Header>(16);
+        this.headers = new ArrayList<>(16);
     }
 
     /**
@@ -175,7 +175,7 @@ public class HeaderGroup implements Seri
      * @return an array of length &ge; 0
      */
     public Header[] getHeaders(final String name) {
-        final List<Header> headersFound = new ArrayList<Header>();
+        final List<Header> headersFound = new ArrayList<>();
         // HTTPCORE-361 : we don't use the for-each syntax, i.e.
         //     for (Header header : headers)
         // as that creates an Iterator that needs to be garbage-collected

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java Sat Mar 14 15:48:55 2015
@@ -86,11 +86,11 @@ public abstract class AbstractConnPool<T
         this.defaultMaxPerRoute = Args.positive(defaultMaxPerRoute, "Max per route value");
         this.maxTotal = Args.positive(maxTotal, "Max total value");
         this.lock = new ReentrantLock();
-        this.routeToPool = new HashMap<T, RouteSpecificPool<T, C, E>>();
-        this.leased = new HashSet<E>();
-        this.available = new LinkedList<E>();
-        this.pending = new LinkedList<PoolEntryFuture<E>>();
-        this.maxPerRoute = new HashMap<T, Integer>();
+        this.routeToPool = new HashMap<>();
+        this.leased = new HashSet<>();
+        this.available = new LinkedList<>();
+        this.pending = new LinkedList<>();
+        this.maxPerRoute = new HashMap<>();
     }
 
     /**
@@ -465,7 +465,7 @@ public abstract class AbstractConnPool<T
     public Set<T> getRoutes() {
         this.lock.lock();
         try {
-            return new HashSet<T>(routeToPool.keySet());
+            return new HashSet<>(routeToPool.keySet());
         } finally {
             this.lock.unlock();
         }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/RouteSpecificPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/RouteSpecificPool.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/RouteSpecificPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/pool/RouteSpecificPool.java Sat Mar 14 15:48:55 2015
@@ -46,9 +46,9 @@ abstract class RouteSpecificPool<T, C, E
     RouteSpecificPool(final T route) {
         super();
         this.route = route;
-        this.leased = new HashSet<E>();
-        this.available = new LinkedList<E>();
-        this.pending = new LinkedList<PoolEntryFuture<E>>();
+        this.leased = new HashSet<>();
+        this.available = new LinkedList<>();
+        this.pending = new LinkedList<>();
     }
 
     protected abstract E createEntry(C conn);

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java?rev=1666696&r1=1666695&r2=1666696&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/BasicHttpContext.java Sat Mar 14 15:48:55 2015
@@ -53,7 +53,7 @@ public class BasicHttpContext implements
 
     public BasicHttpContext(final HttpContext parentContext) {
         super();
-        this.map = new ConcurrentHashMap<String, Object>();
+        this.map = new ConcurrentHashMap<>();
         this.parentContext = parentContext;
     }
 



Mime
View raw message