tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1383614 - in /tomcat/trunk/java/org/apache/tomcat: buildutil/ jni/socket/ spdy/ util/ util/buf/ util/collections/ util/digester/ util/http/ util/http/fileupload/ util/http/fileupload/util/ util/log/ util/modeler/ util/modeler/modules/ util...
Date Tue, 11 Sep 2012 21:14:29 GMT
Author: markt
Date: Tue Sep 11 21:14:27 2012
New Revision: 1383614

URL: http://svn.apache.org/viewvc?rev=1383614&view=rev
Log:
Clean-up Java 7 <>

Modified:
    tomcat/trunk/java/org/apache/tomcat/buildutil/CheckEol.java
    tomcat/trunk/java/org/apache/tomcat/buildutil/Txt2Html.java
    tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java
    tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java
    tomcat/trunk/java/org/apache/tomcat/spdy/SpdyStream.java
    tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
    tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
    tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java
    tomcat/trunk/java/org/apache/tomcat/util/collections/ManagedConcurrentWeakHashMap.java
    tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java
    tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java
    tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java
    tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java
    tomcat/trunk/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java
    tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
    tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java
    tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java
    tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
    tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
    tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java
    tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java
    tomcat/trunk/java/org/apache/tomcat/util/log/SystemLogHandler.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
    tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
    tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java
    tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
    tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
    tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java

Modified: tomcat/trunk/java/org/apache/tomcat/buildutil/CheckEol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/buildutil/CheckEol.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/buildutil/CheckEol.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/buildutil/CheckEol.java Tue Sep 11 21:14:27 2012
@@ -44,7 +44,7 @@ public class CheckEol extends Task {
     private static final String eoln = System.getProperty("line.separator");
 
     /** The files to be checked */
-    private final List<FileSet> filesets = new LinkedList<FileSet>();
+    private final List<FileSet> filesets = new LinkedList<>();
 
     /**
      * Sets the files to be checked
@@ -77,7 +77,7 @@ public class CheckEol extends Task {
 
         int count = 0;
 
-        List<CheckFailure> errors = new ArrayList<CheckFailure>();
+        List<CheckFailure> errors = new ArrayList<>();
 
         // Step through each file and check.
         for (FileSet fs : filesets) {

Modified: tomcat/trunk/java/org/apache/tomcat/buildutil/Txt2Html.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/buildutil/Txt2Html.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/buildutil/Txt2Html.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/buildutil/Txt2Html.java Tue Sep 11 21:14:27 2012
@@ -50,7 +50,7 @@ public class Txt2Html
     private File todir;
 
     /** The file to be converted into HTML */
-    private final List<FileSet> filesets = new LinkedList<FileSet>();
+    private final List<FileSet> filesets = new LinkedList<>();
 
     /**
      * Sets the directory to contain the resulting files

Modified: tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java Tue Sep 11 21:14:27 2012
@@ -118,7 +118,7 @@ public class AprSocketContext {
     /**
      * Pollers.
      */
-    List<AprPoller> pollers = new ArrayList<AprPoller>();
+    List<AprPoller> pollers = new ArrayList<>();
     static int pollerCnt = 0;
 
     // Set on all accepted or connected sockets.
@@ -133,7 +133,7 @@ public class AprSocketContext {
     // If false: use executor ( but that may choke the acceptor thread )
     protected boolean nonBlockingAccept = false;
 
-    BlockingQueue<AprSocket> acceptedQueue = new LinkedBlockingQueue<AprSocket>();
+    BlockingQueue<AprSocket> acceptedQueue = new LinkedBlockingQueue<>();
 
     /**
      * Root APR memory pool.
@@ -167,7 +167,7 @@ public class AprSocketContext {
     RawDataHandler rawDataHandler = null;
 
     // TODO: do we need this here ?
-    protected Map<String, HostInfo> hosts = new HashMap<String, HostInfo>();
+    protected Map<String, HostInfo> hosts = new HashMap<>();
 
     String[] enabledCiphers;
 
@@ -963,7 +963,7 @@ public class AprSocketContext {
 
         // Should be replaced with socket data.
         // used only to lookup by socket
-        Map<Long, AprSocket> channels = new HashMap<Long, AprSocket>();
+        Map<Long, AprSocket> channels = new HashMap<>();
 
         // Active + pending, must be < desc.length / 2
         // The channel will also have poller=this when active or pending
@@ -974,7 +974,7 @@ public class AprSocketContext {
 
         protected AtomicInteger pollCount = new AtomicInteger();
 
-        private List<AprSocket> updates = new ArrayList<AprSocket>();
+        private List<AprSocket> updates = new ArrayList<>();
 
         @Override
         public void run() {

Modified: tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java Tue Sep 11 21:14:27 2012
@@ -47,7 +47,7 @@ public abstract class SpdyConnection { /
     protected CompressSupport compressSupport;
 
     // Fields stored for each spdy connection
-    Map<Integer, SpdyStream> channels = new HashMap<Integer, SpdyStream>();
+    Map<Integer, SpdyStream> channels = new HashMap<>();
 
     // --------------
     protected static final Logger log = Logger.getLogger(SpdyConnection.class
@@ -112,9 +112,9 @@ public abstract class SpdyConnection { /
     int outStreamId = 1;
 
     // TODO: finer handling of priorities
-    LinkedList<SpdyFrame> prioriyQueue = new LinkedList<SpdyFrame>();
+    LinkedList<SpdyFrame> prioriyQueue = new LinkedList<>();
 
-    LinkedList<SpdyFrame> outQueue = new LinkedList<SpdyFrame>();
+    LinkedList<SpdyFrame> outQueue = new LinkedList<>();
 
     // --------------
 
@@ -512,7 +512,7 @@ public abstract class SpdyConnection { /
         System.err.println(msg);
         inClosed = true;
 
-        List<Integer> ch = new ArrayList<Integer>(channels.keySet());
+        List<Integer> ch = new ArrayList<>(channels.keySet());
         for (Integer i: ch) {
             SpdyStream stream = channels.remove(i);
             if (stream != null) {
@@ -525,7 +525,7 @@ public abstract class SpdyConnection { /
         System.err.println(msg);
         inClosed = true;
 
-        List<Integer> ch = new ArrayList<Integer>(channels.keySet());
+        List<Integer> ch = new ArrayList<>(channels.keySet());
         for (Integer i: ch) {
             if (i > last) {
                 SpdyStream stream = channels.remove(i);

Modified: tomcat/trunk/java/org/apache/tomcat/spdy/SpdyStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/spdy/SpdyStream.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/spdy/SpdyStream.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/spdy/SpdyStream.java Tue Sep 11 21:14:27 2012
@@ -50,7 +50,7 @@ public class SpdyStream implements Runna
     /**
      * For blocking support.
      */
-    protected BlockingQueue<SpdyFrame> inData = new LinkedBlockingQueue<SpdyFrame>();
+    protected BlockingQueue<SpdyFrame> inData = new LinkedBlockingQueue<>();
 
     protected boolean finSent;
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Tue Sep 11 21:14:27 2012
@@ -296,8 +296,7 @@ public final class IntrospectionUtils {
         objectMethods.clear();
     }
 
-    static Hashtable<Class<?>,Method[]> objectMethods =
-        new Hashtable<Class<?>,Method[]>();
+    static Hashtable<Class<?>,Method[]> objectMethods = new Hashtable<>();
 
     public static Method[] findMethods(Class<?> c) {
         Method methods[] = objectMethods.get(c);

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Tue Sep 11 21:14:27 2012
@@ -48,7 +48,7 @@ public class B2CConverter {
         StringManager.getManager(Constants.Package);
 
     private static final Map<String, Charset> encodingToCharsetCache =
-        new HashMap<String, Charset>();
+            new HashMap<>();
 
     public static final Charset ISO_8859_1;
     public static final Charset UTF_8;

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java Tue Sep 11 21:14:27 2012
@@ -65,7 +65,7 @@ public class StringCache {
      * Statistics hash map for byte chunk.
      */
     protected static final HashMap<ByteEntry,int[]> bcStats =
-        new HashMap<ByteEntry,int[]>(cacheSize);
+            new HashMap<>(cacheSize);
 
 
     /**
@@ -84,7 +84,7 @@ public class StringCache {
      * Statistics hash map for char chunk.
      */
     protected static final HashMap<CharEntry,int[]> ccStats =
-        new HashMap<CharEntry,int[]>(cacheSize);
+            new HashMap<>(cacheSize);
 
 
     /**
@@ -233,7 +233,7 @@ public class StringCache {
                         long t1 = System.currentTimeMillis();
                         // Sort the entries according to occurrence
                         TreeMap<Integer,ArrayList<ByteEntry>> tempMap =
-                            new TreeMap<Integer,ArrayList<ByteEntry>>();
+                                new TreeMap<>();
                         for (Entry<ByteEntry,int[]> item : bcStats.entrySet()) {
                             ByteEntry entry = item.getKey();
                             int[] countA = item.getValue();
@@ -242,7 +242,7 @@ public class StringCache {
                             ArrayList<ByteEntry> list = tempMap.get(count);
                             if (list == null) {
                                 // Create list
-                                list = new ArrayList<ByteEntry>();
+                                list = new ArrayList<>();
                                 tempMap.put(count, list);
                             }
                             list.add(entry);
@@ -350,7 +350,7 @@ public class StringCache {
                         long t1 = System.currentTimeMillis();
                         // Sort the entries according to occurrence
                         TreeMap<Integer,ArrayList<CharEntry>> tempMap =
-                            new TreeMap<Integer,ArrayList<CharEntry>>();
+                                new TreeMap<>();
                         for (Entry<CharEntry,int[]> item : ccStats.entrySet()) {
                             CharEntry entry = item.getKey();
                             int[] countA = item.getValue();
@@ -359,7 +359,7 @@ public class StringCache {
                             ArrayList<CharEntry> list = tempMap.get(count);
                             if (list == null) {
                                 // Create list
-                                list = new ArrayList<CharEntry>();
+                                list = new ArrayList<>();
                                 tempMap.put(count, list);
                             }
                             list.add(entry);

Modified: tomcat/trunk/java/org/apache/tomcat/util/collections/ManagedConcurrentWeakHashMap.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/collections/ManagedConcurrentWeakHashMap.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/collections/ManagedConcurrentWeakHashMap.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/collections/ManagedConcurrentWeakHashMap.java Tue Sep 11 21:14:27 2012
@@ -37,8 +37,8 @@ import java.util.concurrent.ConcurrentMa
 public class ManagedConcurrentWeakHashMap<K, V> extends AbstractMap<K, V> implements
         ConcurrentMap<K, V> {
 
-    private final ConcurrentMap<Key, V> map = new ConcurrentHashMap<Key, V>();
-    private final ReferenceQueue<Object> queue = new ReferenceQueue<Object>();
+    private final ConcurrentMap<Key, V> map = new ConcurrentHashMap<>();
+    private final ReferenceQueue<Object> queue = new ReferenceQueue<>();
 
     /**
      * Method, that has to be invoked periodically to clean dead keys from the

Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java Tue Sep 11 21:14:27 2012
@@ -201,7 +201,7 @@ public class CallParamRule extends Rule 
             // so that we can make sure that the right set of parameters
             // is at the top of the stack
             if (bodyTextStack == null) {
-                bodyTextStack = new ArrayStack<String>();
+                bodyTextStack = new ArrayStack<>();
             }
             bodyTextStack.push(bodyText.trim());
         }

Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Tue Sep 11 21:14:27 2012
@@ -168,8 +168,7 @@ public class Digester extends DefaultHan
     /**
      * The stack of body text string buffers for surrounding elements.
      */
-    protected ArrayStack<StringBuilder> bodyTexts =
-        new ArrayStack<StringBuilder>();
+    protected ArrayStack<StringBuilder> bodyTexts = new ArrayStack<>();
 
 
     /**
@@ -182,7 +181,7 @@ public class Digester extends DefaultHan
      *
      * @since 1.6
      */
-    protected ArrayStack<List<Rule>> matches = new ArrayStack<List<Rule>>(10);
+    protected ArrayStack<List<Rule>> matches = new ArrayStack<>(10);
 
     /**
      * The class loader to use for instantiating application objects.
@@ -208,8 +207,7 @@ public class Digester extends DefaultHan
      * The URLs of entityValidator that have been registered, keyed by the public
      * identifier that corresponds.
      */
-    protected HashMap<String,String> entityValidator =
-        new HashMap<String,String>();
+    protected HashMap<String,String> entityValidator = new HashMap<>();
 
 
     /**
@@ -250,16 +248,14 @@ public class Digester extends DefaultHan
      * is required because documents can declare nested uses of the same
      * prefix for different Namespace URIs).
      */
-    protected HashMap<String,ArrayStack<String>> namespaces =
-        new HashMap<String,ArrayStack<String>>();
+    protected HashMap<String,ArrayStack<String>> namespaces = new HashMap<>();
 
 
     /**
      * The parameters stack being utilized by CallMethodRule and
      * CallParamRule rules.
      */
-    protected ArrayStack<Object> params = new ArrayStack<Object>();
-
+    protected ArrayStack<Object> params = new ArrayStack<>();
 
     /**
      * The SAXParser we will use to parse the input stream.
@@ -298,7 +294,7 @@ public class Digester extends DefaultHan
     /**
      * The object stack being constructed.
      */
-    protected ArrayStack<Object> stack = new ArrayStack<Object>();
+    protected ArrayStack<Object> stack = new ArrayStack<>();
 
 
     /**
@@ -340,9 +336,9 @@ public class Digester extends DefaultHan
         LogFactory.getLog("org.apache.tomcat.util.digester.Digester.sax");
 
 
-    /** Stacks used for interrule communication, indexed by name String */
+    /** Stacks used for inter-rule communication, indexed by name String */
     private HashMap<String,ArrayStack<Object>> stacksByName =
-        new HashMap<String,ArrayStack<Object>>();
+            new HashMap<>();
 
     // ------------------------------------------------------------- Properties
 
@@ -1310,7 +1306,7 @@ public class Digester extends DefaultHan
         // Register this prefix mapping
         ArrayStack<String> stack = namespaces.get(prefix);
         if (stack == null) {
-            stack = new ArrayStack<String>();
+            stack = new ArrayStack<>();
             namespaces.put(prefix, stack);
         }
         stack.push(namespaceURI);
@@ -2406,7 +2402,7 @@ public class Digester extends DefaultHan
     public void push(String stackName, Object value) {
         ArrayStack<Object> namedStack = stacksByName.get(stackName);
         if (namedStack == null) {
-            namedStack = new ArrayStack<Object>();
+            namedStack = new ArrayStack<>();
             stacksByName.put(stackName, namedStack);
         }
         namedStack.push(value);

Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java Tue Sep 11 21:14:27 2012
@@ -262,7 +262,7 @@ public class FactoryCreateRule extends R
         if (ignoreCreateExceptions) {
 
             if (exceptionIgnoredStack == null) {
-                exceptionIgnoredStack = new ArrayStack<Boolean>();
+                exceptionIgnoredStack = new ArrayStack<>();
             }
 
             try {

Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java Tue Sep 11 21:14:27 2012
@@ -53,8 +53,7 @@ public class RulesBase implements Rules 
      * Each value is a List containing the Rules for that pattern, in the
      * order that they were originally registered.
      */
-    protected HashMap<String,List<Rule>> cache =
-        new HashMap<String,List<Rule>>();
+    protected HashMap<String,List<Rule>> cache = new HashMap<>();
 
 
     /**
@@ -75,7 +74,7 @@ public class RulesBase implements Rules 
      * The set of registered Rule instances, in the order that they were
      * originally registered.
      */
-    protected ArrayList<Rule> rules = new ArrayList<Rule>();
+    protected ArrayList<Rule> rules = new ArrayList<>();
 
 
     // ------------------------------------------------------------- Properties
@@ -159,7 +158,7 @@ public class RulesBase implements Rules 
 
         List<Rule> list = cache.get(pattern);
         if (list == null) {
-            list = new ArrayList<Rule>();
+            list = new ArrayList<>();
             cache.put(pattern, list);
         }
         list.add(rule);
@@ -221,7 +220,7 @@ public class RulesBase implements Rules 
             }
         }
         if (rulesList == null) {
-            rulesList = new ArrayList<Rule>();
+            rulesList = new ArrayList<>();
         }
         return (rulesList);
 
@@ -267,7 +266,7 @@ public class RulesBase implements Rules 
         }
 
         // Select only Rules that match on the specified namespace URI
-        ArrayList<Rule> results = new ArrayList<Rule>();
+        ArrayList<Rule> results = new ArrayList<>();
         Iterator<Rule> items = list.iterator();
         while (items.hasNext()) {
             Rule item = items.next();

Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java Tue Sep 11 21:14:27 2012
@@ -53,9 +53,9 @@ public class WithDefaultsRulesWrapper im
     /** The Rules implementation that this class wraps. */
     private Rules wrappedRules;
     /** Rules to be fired when the wrapped implementations returns none. */
-    private List<Rule> defaultRules = new ArrayList<Rule>();
+    private List<Rule> defaultRules = new ArrayList<>();
     /** All rules (preserves order in which they were originally added) */
-    private List<Rule> allRules = new ArrayList<Rule>();
+    private List<Rule> allRules = new ArrayList<>();
 
     // --------------------------------------------------------- Constructor
 
@@ -120,7 +120,7 @@ public class WithDefaultsRulesWrapper im
         List<Rule> matches = wrappedRules.match(namespaceURI, pattern);
         if (matches ==  null || matches.isEmpty()) {
             // a little bit of defensive programming
-            return new ArrayList<Rule>(defaultRules);
+            return new ArrayList<>(defaultRules);
         }
         // otherwise
         return matches;

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java Tue Sep 11 21:14:27 2012
@@ -92,14 +92,14 @@ public final class FastHttpDateFormat {
      * Formatter cache.
      */
     private static final ConcurrentHashMap<Long, String> formatCache =
-        new ConcurrentHashMap<Long, String>(CACHE_SIZE);
+            new ConcurrentHashMap<>(CACHE_SIZE);
 
 
     /**
      * Parser cache.
      */
     private static final ConcurrentHashMap<String, Long> parseCache =
-        new ConcurrentHashMap<String, Long>(CACHE_SIZE);
+            new ConcurrentHashMap<>(CACHE_SIZE);
 
 
     // --------------------------------------------------------- Public Methods

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java Tue Sep 11 21:14:27 2012
@@ -50,7 +50,7 @@ public final class Parameters {
         StringManager.getManager("org.apache.tomcat.util.http");
 
     private final HashMap<String,ArrayList<String>> paramHashValues =
-        new HashMap<String,ArrayList<String>>();
+            new HashMap<>();
     private boolean didQueryParameters=false;
 
     MessageBytes queryMB;
@@ -195,7 +195,7 @@ public final class Parameters {
 
         ArrayList<String> values = paramHashValues.get(key);
         if (values == null) {
-            values = new ArrayList<String>(1);
+            values = new ArrayList<>(1);
             paramHashValues.put(key, values);
         }
         values.add(value);

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java Tue Sep 11 21:14:27 2012
@@ -54,7 +54,7 @@ public class ByteArrayOutputStream exten
     private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
 
     /** The list of buffers, which grows and never reduces. */
-    private List<byte[]> buffers = new ArrayList<byte[]>();
+    private List<byte[]> buffers = new ArrayList<>();
     /** The index of the current buffer. */
     private int currentBufferIndex;
     /** The total count of bytes in all the filled buffers. */

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java Tue Sep 11 21:14:27 2012
@@ -48,7 +48,7 @@ public class FileCleaningTracker {
     /**
      * Collection of <code>Tracker</code> instances in existence.
      */
-    final Collection<Tracker> trackers = new Vector<Tracker>();  // synchronized
+    final Collection<Tracker> trackers = new Vector<>();  // synchronized
     /**
      * Whether to terminate the thread when the tracking is complete.
      */

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java Tue Sep 11 21:14:27 2012
@@ -298,7 +298,7 @@ public abstract class FileUploadBase {
      */
     public List<FileItem> parseRequest(RequestContext ctx)
             throws FileUploadException {
-        List<FileItem> items = new ArrayList<FileItem>();
+        List<FileItem> items = new ArrayList<>();
         boolean successful = false;
         try {
             FileItemIterator iter = getItemIterator(ctx);

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java Tue Sep 11 21:14:27 2012
@@ -227,7 +227,7 @@ public class ParameterParser {
      */
     public Map<String,String> parse(final String str, char[] separators) {
         if (separators == null || separators.length == 0) {
-            return new HashMap<String,String>();
+            return new HashMap<>();
         }
         char separator = separators[0];
         if (str != null) {
@@ -256,7 +256,7 @@ public class ParameterParser {
      */
     public Map<String,String> parse(final String str, char separator) {
         if (str == null) {
-            return new HashMap<String,String>();
+            return new HashMap<>();
         }
         return parse(str.toCharArray(), separator);
     }
@@ -273,7 +273,7 @@ public class ParameterParser {
      */
     public Map<String,String> parse(final char[] inputChars, char separator) {
         if (inputChars == null) {
-            return new HashMap<String,String>();
+            return new HashMap<>();
         }
         return parse(inputChars, 0, inputChars.length, separator);
     }
@@ -297,9 +297,9 @@ public class ParameterParser {
         char separator) {
 
         if (inputChars == null) {
-            return new HashMap<String,String>();
+            return new HashMap<>();
         }
-        HashMap<String,String> params = new HashMap<String,String>();
+        HashMap<String,String> params = new HashMap<>();
         this.chars = inputChars;
         this.pos = offset;
         this.len = length;

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java Tue Sep 11 21:14:27 2012
@@ -42,14 +42,14 @@ public class FileItemHeadersImpl impleme
      * <code>String</code> instances.
      */
     private final Map<String,List<String>> headerNameToValueListMap =
-        new HashMap<String,List<String>>();
+            new HashMap<>();
 
     /**
      * List to preserve order of headers as added.  This would not be
      * needed if a <code>LinkedHashMap</code> could be used, but don't
      * want to depend on 1.4.
      */
-    private final List<String> headerNameList = new ArrayList<String>();
+    private final List<String> headerNameList = new ArrayList<>();
 
     @Override
     public String getHeader(String name) {
@@ -86,7 +86,7 @@ public class FileItemHeadersImpl impleme
         String nameLower = name.toLowerCase();
         List<String> headerValueList = headerNameToValueListMap.get(nameLower);
         if (null == headerValueList) {
-            headerValueList = new ArrayList<String>();
+            headerValueList = new ArrayList<>();
             headerNameToValueListMap.put(nameLower, headerValueList);
             headerNameList.add(nameLower);
         }

Modified: tomcat/trunk/java/org/apache/tomcat/util/log/SystemLogHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/log/SystemLogHandler.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/log/SystemLogHandler.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/log/SystemLogHandler.java Tue Sep 11 21:14:27 2012
@@ -59,14 +59,13 @@ public class SystemLogHandler extends Pr
     /**
      * Thread <-> CaptureLog associations.
      */
-    protected static ThreadLocal<Stack<CaptureLog>> logs =
-        new ThreadLocal<Stack<CaptureLog>>();
+    protected static ThreadLocal<Stack<CaptureLog>> logs = new ThreadLocal<>();
 
 
     /**
      * Spare CaptureLog ready for reuse.
      */
-    protected static Stack<CaptureLog> reuse = new Stack<CaptureLog>();
+    protected static Stack<CaptureLog> reuse = new Stack<>();
 
 
     // --------------------------------------------------------- Public Methods
@@ -88,7 +87,7 @@ public class SystemLogHandler extends Pr
         }
         Stack<CaptureLog> stack = logs.get();
         if (stack == null) {
-            stack = new Stack<CaptureLog>();
+            stack = new Stack<>();
             logs.set(stack);
         }
         stack.push(log);

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java Tue Sep 11 21:14:27 2012
@@ -65,7 +65,7 @@ public class BaseAttributeFilter impleme
      * The set of attribute names that are accepted by this filter.  If this
      * list is empty, all attribute names are accepted.
      */
-    private HashSet<String> names = new HashSet<String>();
+    private HashSet<String> names = new HashSet<>();
 
 
     // --------------------------------------------------------- Public Methods

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java Tue Sep 11 21:14:27 2012
@@ -54,7 +54,7 @@ public class BaseNotificationBroadcaster
      * entries.
      */
     protected ArrayList<BaseNotificationBroadcasterEntry> entries =
-        new ArrayList<BaseNotificationBroadcasterEntry>();
+            new ArrayList<>();
 
 
     // --------------------------------------------------------- Public Methods

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/ManagedBean.java Tue Sep 11 21:14:27 2012
@@ -61,11 +61,9 @@ public class ManagedBean implements java
      */
     transient MBeanInfo info = null;
 
-    private Map<String,AttributeInfo> attributes =
-        new HashMap<String,AttributeInfo>();
+    private Map<String,AttributeInfo> attributes = new HashMap<>();
 
-    private Map<String,OperationInfo> operations =
-        new HashMap<String,OperationInfo>();
+    private Map<String,OperationInfo> operations = new HashMap<>();
 
     protected String className = BASE_MBEAN;
     protected String description = null;

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java Tue Sep 11 21:14:27 2012
@@ -101,24 +101,22 @@ public class Registry implements Registr
      * The set of ManagedBean instances for the beans this registry
      * knows about, keyed by name.
      */
-    private HashMap<String,ManagedBean> descriptors =
-        new HashMap<String,ManagedBean>();
+    private HashMap<String,ManagedBean> descriptors = new HashMap<>();
 
     /** List of managed beans, keyed by class name
      */
-    private HashMap<String,ManagedBean> descriptorsByClass =
-        new HashMap<String,ManagedBean>();
+    private HashMap<String,ManagedBean> descriptorsByClass = new HashMap<>();
 
     // map to avoid duplicated searching or loading descriptors
-    private HashMap<String,URL> searchedPaths=new HashMap<String,URL>();
+    private HashMap<String,URL> searchedPaths = new HashMap<>();
 
     private Object guard;
 
     // Id - small ints to use array access. No reset on stop()
     // Used for notifications
     private final Hashtable<String,Hashtable<String,Integer>> idDomains =
-        new Hashtable<String,Hashtable<String,Integer>>();
-    private final Hashtable<String,int[]> ids = new Hashtable<String,int[]>();
+        new Hashtable<>();
+    private final Hashtable<String,int[]> ids = new Hashtable<>();
 
 
     // ----------------------------------------------------------- Constructors
@@ -191,9 +189,9 @@ public class Registry implements Registr
      */
     @Override
     public void stop() {
-        descriptorsByClass = new HashMap<String,ManagedBean>();
-        descriptors = new HashMap<String,ManagedBean>();
-        searchedPaths=new HashMap<String,URL>();
+        descriptorsByClass = new HashMap<>();
+        descriptors = new HashMap<>();
+        searchedPaths=new HashMap<>();
     }
 
     /** Register a bean by creating a modeler mbean and adding it to the
@@ -301,7 +299,7 @@ public class Registry implements Registr
         }
         Hashtable<String,Integer> domainTable = idDomains.get(domain);
         if( domainTable == null ) {
-            domainTable = new Hashtable<String,Integer>();
+            domainTable = new Hashtable<>();
             idDomains.put( domain, domainTable);
         }
         if( name==null ) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java Tue Sep 11 21:14:27 2012
@@ -39,7 +39,7 @@ public class MbeansDescriptorsDigesterSo
 
     private Registry registry;
     private String type;
-    private final List<ObjectName> mbeans = new ArrayList<ObjectName>();
+    private final List<ObjectName> mbeans = new ArrayList<>();
     private static volatile Digester digester = null;
 
     private static Digester createDigester() {
@@ -169,7 +169,7 @@ public class MbeansDescriptorsDigesterSo
         if (digester == null) {
             digester = createDigester();
         }
-        ArrayList<ManagedBean> loadedMbeans = new ArrayList<ManagedBean>();
+        ArrayList<ManagedBean> loadedMbeans = new ArrayList<>();
 
         synchronized (digester) {
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java Tue Sep 11 21:14:27 2012
@@ -42,7 +42,7 @@ public class MbeansDescriptorsIntrospect
 
     private Registry registry;
     private String type;
-    private final List<ObjectName> mbeans = new ArrayList<ObjectName>();
+    private final List<ObjectName> mbeans = new ArrayList<>();
 
     public void setRegistry(Registry reg) {
         this.registry=reg;
@@ -90,7 +90,7 @@ public class MbeansDescriptorsIntrospect
     // ------------ Implementation for non-declared introspection classes
 
     private static final Hashtable<String,String> specialMethods =
-        new Hashtable<String,String>();
+            new Hashtable<>();
     static {
         specialMethods.put( "preDeregister", "");
         specialMethods.put( "postDeregister", "");
@@ -285,13 +285,13 @@ public class MbeansDescriptorsIntrospect
 
         Method methods[]=null;
 
-        Hashtable<String,Method> attMap = new Hashtable<String,Method>();
+        Hashtable<String,Method> attMap = new Hashtable<>();
         // key: attribute val: getter method
-        Hashtable<String,Method> getAttMap = new Hashtable<String,Method>();
+        Hashtable<String,Method> getAttMap = new Hashtable<>();
         // key: attribute val: setter method
-        Hashtable<String,Method> setAttMap = new Hashtable<String,Method>();
+        Hashtable<String,Method> setAttMap = new Hashtable<>();
         // key: operation val: invoke method
-        Hashtable<String,Method> invokeAttMap = new Hashtable<String,Method>();
+        Hashtable<String,Method> invokeAttMap = new Hashtable<>();
 
         methods = realClass.getMethods();
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java Tue Sep 11 21:14:27 2012
@@ -35,7 +35,7 @@ public class MbeansDescriptorsSerSource 
     private static final Log log = LogFactory.getLog(MbeansDescriptorsSerSource.class);
     private Registry registry;
     private String type;
-    private final List<ObjectName> mbeans=new ArrayList<ObjectName>();
+    private final List<ObjectName> mbeans=new ArrayList<>();
 
     public void setRegistry(Registry reg) {
         this.registry=reg;

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Tue Sep 11 21:14:27 2012
@@ -394,8 +394,8 @@ public abstract class AbstractEndpoint {
      * sub-component is the
      * {@link org.apache.tomcat.util.net.ServerSocketFactory}.
      */
-    protected HashMap<String, Object> attributes =
-        new HashMap<String, Object>();
+    protected HashMap<String, Object> attributes = new HashMap<>();
+
     /**
      * Generic property setter called when a property for which a specific
      * setter already exists within the
@@ -901,7 +901,7 @@ public abstract class AbstractEndpoint {
         if (s == null) {
             this.sslEnabledProtocolsarr = new String[0];
         } else {
-            ArrayList<String> sslEnabledProtocols = new ArrayList<String>();
+            ArrayList<String> sslEnabledProtocols = new ArrayList<>();
             StringTokenizer t = new StringTokenizer(s,",");
             while (t.hasMoreTokens()) {
                 String p = t.nextToken().trim();

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Sep 11 21:14:27 2012
@@ -95,7 +95,7 @@ public class AprEndpoint extends Abstrac
 
 
     protected ConcurrentLinkedQueue<SocketWrapper<Long>> waitingRequests =
-        new ConcurrentLinkedQueue<SocketWrapper<Long>>();
+            new ConcurrentLinkedQueue<>();
 
     // ------------------------------------------------------------ Constructor
 
@@ -823,7 +823,7 @@ public class AprEndpoint extends Abstrac
             // During shutdown, executor may be null - avoid NPE
             if (running) {
                 SocketWrapper<Long> wrapper =
-                    new SocketWrapper<Long>(Long.valueOf(socket));
+                    new SocketWrapper<>(Long.valueOf(socket));
                 getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
             }
         } catch (RejectedExecutionException x) {
@@ -852,7 +852,7 @@ public class AprEndpoint extends Abstrac
                         Long.valueOf(socket), null));
             } else {
                 SocketWrapper<Long> wrapper =
-                    new SocketWrapper<Long>(Long.valueOf(socket));
+                    new SocketWrapper<>(Long.valueOf(socket));
                 executor.execute(new SocketProcessor(wrapper, null));
             }
         } catch (RejectedExecutionException x) {
@@ -880,7 +880,7 @@ public class AprEndpoint extends Abstrac
                         Long.valueOf(socket), status));
             } else {
                 SocketWrapper<Long> wrapper =
-                        new SocketWrapper<Long>(Long.valueOf(socket));
+                        new SocketWrapper<>(Long.valueOf(socket));
                 executor.execute(new SocketEventProcessor(wrapper, status));
             }
         } catch (RejectedExecutionException x) {
@@ -1444,8 +1444,8 @@ public class AprEndpoint extends Abstrac
                 sendfilePollset = allocatePoller(size, pool, socketProperties.getSoTimeout());
             }
             desc = new long[size * 2];
-            sendfileData = new HashMap<Long, SendfileData>(size);
-            addS = new ArrayList<SendfileData>();
+            sendfileData = new HashMap<>(size);
+            addS = new ArrayList<>();
             addCount = 0;
         }
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Tue Sep 11 21:14:27 2012
@@ -517,7 +517,7 @@ public class JIoEndpoint extends Abstrac
     protected boolean processSocket(Socket socket) {
         // Process the request from this socket
         try {
-            SocketWrapper<Socket> wrapper = new SocketWrapper<Socket>(socket);
+            SocketWrapper<Socket> wrapper = new SocketWrapper<>(socket);
             wrapper.setKeepAliveLeft(getMaxKeepAliveRequests());
             // During shutdown, executor may be null - avoid NPE
             if (!running) {
@@ -595,7 +595,7 @@ public class JIoEndpoint extends Abstrac
     }
 
     protected ConcurrentLinkedQueue<SocketWrapper<Socket>> waitingRequests =
-        new ConcurrentLinkedQueue<SocketWrapper<Socket>>();
+            new ConcurrentLinkedQueue<>();
 
     @Override
     protected Log getLog() {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Tue Sep 11 21:14:27 2012
@@ -203,7 +203,8 @@ public class NioBlockingSelector {
     protected static class BlockPoller extends Thread {
         protected volatile boolean run = true;
         protected Selector selector = null;
-        protected ConcurrentLinkedQueue<Runnable> events = new ConcurrentLinkedQueue<Runnable>();
+        protected ConcurrentLinkedQueue<Runnable> events =
+                new ConcurrentLinkedQueue<>();
         public void disable() { run = false; selector.wakeup();}
         protected AtomicInteger wakeupCounter = new AtomicInteger(0);
         public void cancelKey(final SelectionKey key) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Sep 11 21:14:27 2012
@@ -948,7 +948,8 @@ public class NioEndpoint extends Abstrac
     public class Poller implements Runnable {
 
         protected Selector selector;
-        protected ConcurrentLinkedQueue<Runnable> events = new ConcurrentLinkedQueue<Runnable>();
+        protected ConcurrentLinkedQueue<Runnable> events =
+                new ConcurrentLinkedQueue<>();
 
         protected volatile boolean close = false;
         protected long nextExpiration = 0;//optimize expiration handling

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java Tue Sep 11 21:14:27 2012
@@ -58,7 +58,7 @@ public class NioSelectorPool {
     protected AtomicInteger active = new AtomicInteger(0);
     protected AtomicInteger spare = new AtomicInteger(0);
     protected ConcurrentLinkedQueue<Selector> selectors =
-        new ConcurrentLinkedQueue<Selector>();
+            new ConcurrentLinkedQueue<>();
 
     protected Selector getSharedSelector() throws IOException {
         if (SHARED && SHARED_SELECTOR == null) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Tue Sep 11 21:14:27 2012
@@ -235,7 +235,7 @@ public class JSSESocketFactory implement
                                      && i<supportedCiphers.length; i++) {
                             if (supportedCiphers[i].equals(cipher)) {
                                 if (vec == null) {
-                                    vec = new Vector<String>();
+                                    vec = new Vector<>();
                                 }
                                 vec.addElement(cipher);
                                 break;
@@ -259,7 +259,7 @@ public class JSSESocketFactory implement
                                  && i<supportedCiphers.length; i++) {
                         if (supportedCiphers[i].equals(cipher)) {
                             if (vec == null) {
-                                vec = new Vector<String>();
+                                vec = new Vector<>();
                             }
                             vec.addElement(cipher);
                             break;
@@ -748,7 +748,7 @@ public class JSSESocketFactory implement
                         i < supportedProtocols.length; i++) {
                     if (supportedProtocols[i].equals(protocol)) {
                         if (vec == null) {
-                            vec = new Vector<String>();
+                            vec = new Vector<>();
                         }
                         vec.addElement(protocol);
                         break;

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Tue Sep 11 21:14:27 2012
@@ -61,7 +61,7 @@ class JSSESupport implements SSLSupport,
         StringManager.getManager("org.apache.tomcat.util.net.jsse.res");
 
     private static final Map<SSLSession,Integer> keySizeCache =
-        new WeakHashMap<SSLSession, Integer>();
+            new WeakHashMap<>();
 
     protected SSLSocket ssl;
     protected SSLSession session;

Modified: tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java?rev=1383614&r1=1383613&r2=1383614&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/res/StringManager.java Tue Sep 11 21:14:27 2012
@@ -165,7 +165,7 @@ public class StringManager {
     // --------------------------------------------------------------
 
     private static final Map<String, Map<Locale,StringManager>> managers =
-        new Hashtable<String, Map<Locale,StringManager>>();
+            new Hashtable<>();
 
     /**
      * Get the StringManager for a particular package. If a manager for
@@ -192,7 +192,7 @@ public class StringManager {
 
         Map<Locale,StringManager> map = managers.get(packageName);
         if (map == null) {
-            map = new Hashtable<Locale, StringManager>();
+            map = new Hashtable<>();
             managers.put(packageName, map);
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message