tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1384085 [2/2] - in /tomcat/sandbox/trunk-resources: ./ java/org/apache/catalina/core/ java/org/apache/catalina/tribes/tipis/ java/org/apache/coyote/spdy/ java/org/apache/jasper/runtime/ java/org/apache/jasper/security/ java/org/apache/jasp...
Date Wed, 12 Sep 2012 18:51:22 GMT
Modified: tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/Parameters.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/Parameters.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/Parameters.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/Parameters.java Wed Sep
12 18:51:20 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);

Propchange: tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/
------------------------------------------------------------------------------
  Merged /tomcat/trunk/java/org/apache/tomcat/util/http/fileupload:r1382517-1384080

Modified: tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/log/SystemLogHandler.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/log/SystemLogHandler.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/log/SystemLogHandler.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/log/SystemLogHandler.java Wed
Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseAttributeFilter.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
Wed Sep 12 18:51:20 2012
@@ -54,7 +54,7 @@ public class BaseNotificationBroadcaster
      * entries.
      */
     protected ArrayList<BaseNotificationBroadcasterEntry> entries =
-        new ArrayList<BaseNotificationBroadcasterEntry>();
+            new ArrayList<>();
 
 
     // --------------------------------------------------------- Public Methods

Modified: tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/ManagedBean.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/ManagedBean.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/ManagedBean.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/ManagedBean.java Wed
Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/Registry.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/Registry.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/Registry.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/Registry.java Wed Sep
12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
Wed Sep 12 18:51:20 2012
@@ -38,8 +38,7 @@ public class MbeansDescriptorsDigesterSo
             LogFactory.getLog(MbeansDescriptorsDigesterSource.class);
 
     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() {
@@ -137,14 +136,6 @@ public class MbeansDescriptorsDigesterSo
     }
 
 
-    /** Used if a single component is loaded
-     *
-     * @param type
-     */
-    public void setType( String type ) {
-       this.type=type;
-    }
-
     public void setSource( Object source ) {
         this.source=source;
     }
@@ -153,7 +144,6 @@ public class MbeansDescriptorsDigesterSo
     public List<ObjectName> loadDescriptors( Registry registry, String type,
             Object source) throws Exception {
         setRegistry(registry);
-        setType(type);
         setSource(source);
         execute();
         return mbeans;
@@ -169,7 +159,7 @@ public class MbeansDescriptorsDigesterSo
         if (digester == null) {
             digester = createDigester();
         }
-        ArrayList<ManagedBean> loadedMbeans = new ArrayList<ManagedBean>();
+        ArrayList<ManagedBean> loadedMbeans = new ArrayList<>();
 
         synchronized (digester) {
 

Modified: tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
Wed Sep 12 18:51:20 2012
@@ -34,21 +34,12 @@ 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;
     }
 
-    /** Used if a single component is loaded
-     *
-     * @param type
-     */
-    public void setType( String type ) {
-       this.type=type;
-    }
-
     public void setSource( Object source ) {
         this.source=source;
     }
@@ -57,7 +48,6 @@ public class MbeansDescriptorsSerSource 
     public List<ObjectName> loadDescriptors( Registry registry, String type,
             Object source) throws Exception {
         setRegistry(registry);
-        setType(type);
         setSource(source);
         execute();
         return mbeans;

Modified: tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AbstractEndpoint.java Wed
Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Sep
12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/JIoEndpoint.java Wed Sep
12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioBlockingSelector.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioBlockingSelector.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioBlockingSelector.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioBlockingSelector.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Sep
12 18:51:20 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
@@ -1432,7 +1433,7 @@ public class NioEndpoint extends Abstrac
                         cancelledKey(key, SocketStatus.ERROR);//TODO this is not yet being
used
                     } else if (ka.getCometNotify() ) {
                         ka.setCometNotify(false);
-                        int ops = ka.interestOps() & ~OP_CALLBACK;;
+                        int ops = ka.interestOps() & ~OP_CALLBACK;
                         reg(key,ka,0);//avoid multiple calls, this gets re-registered after
invocation
                         ka.interestOps(ops);
                         if (!processSocket(ka.getChannel(), SocketStatus.OPEN_READ, true))
processSocket(ka.getChannel(), SocketStatus.DISCONNECT, true);

Modified: tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioSelectorPool.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioSelectorPool.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioSelectorPool.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/NioSelectorPool.java Wed
Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
Wed Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/jsse/JSSESupport.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/jsse/JSSESupport.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/jsse/JSSESupport.java Wed
Sep 12 18:51:20 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/sandbox/trunk-resources/java/org/apache/tomcat/util/res/StringManager.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/res/StringManager.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/res/StringManager.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/res/StringManager.java Wed
Sep 12 18:51:20 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);
         }
 

Modified: tomcat/sandbox/trunk-resources/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java
(original)
+++ tomcat/sandbox/trunk-resources/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java
Wed Sep 12 18:51:20 2012
@@ -61,9 +61,10 @@ public class DisposableConnectionFacade 
     public Object invoke(Object proxy, Method method, Object[] args)
             throws Throwable {
         if (compare(EQUALS_VAL, method)) {
-            return this.equals(Proxy.getInvocationHandler(args[0]));
+            return Boolean.valueOf(
+                    this.equals(Proxy.getInvocationHandler(args[0])));
         } else if (compare(HASHCODE_VAL, method)) {
-            return this.hashCode();
+            return Integer.valueOf(this.hashCode());
         } else if (getNext()==null) {
             if (compare(ISCLOSED_VAL, method)) {
                 return Boolean.TRUE;

Modified: tomcat/sandbox/trunk-resources/res/findbugs/filter-false-positives.xml
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/res/findbugs/filter-false-positives.xml?rev=1384085&r1=1384084&r2=1384085&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/res/findbugs/filter-false-positives.xml (original)
+++ tomcat/sandbox/trunk-resources/res/findbugs/filter-false-positives.xml Wed Sep 12 18:51:20
2012
@@ -52,9 +52,9 @@
     <Bug code="IS"/>
   </Match>
   <Match>
-    <Class name="org.apache.catalina.authenticator.DigestAuthenticator"/>
-    <Field name="cnonces"/>
-    <Bug code="IS"/>
+    <!-- Method is synchronized therefore not an issue -->
+    <Class name="org.apache.catalina.authenticator.DigestAuthenticator$NonceInfo"/>
+    <Bug code="VO"/>
   </Match>
   <Match>
     <Class name="org.apache.catalina.connector.CoyoteReader"/>



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


Mime
View raw message