tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1238326 - in /tomcat/trunk/java/org/apache/tomcat/util/modeler/modules: MbeansDescriptorsDigesterSource.java MbeansDescriptorsIntrospectionSource.java MbeansDescriptorsSerSource.java
Date Tue, 31 Jan 2012 09:33:31 GMT
Author: markt
Date: Tue Jan 31 09:33:30 2012
New Revision: 1238326

URL: http://svn.apache.org/viewvc?rev=1238326&view=rev
Log:
Use final. Reference array classes directly

Modified:
    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

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=1238326&r1=1238325&r2=1238326&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 Jan 31 09:33:30 2012
@@ -39,7 +39,7 @@ public class MbeansDescriptorsDigesterSo
 
     private Registry registry;
     private String type;
-    private List<ObjectName> mbeans = new ArrayList<ObjectName>();
+    private final List<ObjectName> mbeans = new ArrayList<ObjectName>();
     private static volatile Digester digester = null;
 
     private static Digester createDigester() {

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=1238326&r1=1238325&r2=1238326&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 Jan 31 09:33:30 2012
@@ -42,7 +42,7 @@ public class MbeansDescriptorsIntrospect
 
     private Registry registry;
     private String type;
-    private List<ObjectName> mbeans = new ArrayList<ObjectName>();
+    private final List<ObjectName> mbeans = new ArrayList<ObjectName>();
 
     public void setRegistry(Registry reg) {
         this.registry=reg;
@@ -89,18 +89,14 @@ public class MbeansDescriptorsIntrospect
 
     // ------------ Implementation for non-declared introspection classes
 
-    private static Hashtable<String,String> specialMethods =
+    private static final Hashtable<String,String> specialMethods =
         new Hashtable<String,String>();
     static {
         specialMethods.put( "preDeregister", "");
         specialMethods.put( "postDeregister", "");
     }
 
-    private static String strArray[]=new String[0];
-    private static ObjectName objNameArray[]=new ObjectName[0];
-    // createMBean == registerClass + registerMBean
-
-    private static Class<?>[] supportedTypes  = new Class[] {
+    private static final Class<?>[] supportedTypes  = new Class[] {
         Boolean.class,
         Boolean.TYPE,
         Byte.class,
@@ -118,11 +114,11 @@ public class MbeansDescriptorsIntrospect
         Double.class,
         Double.TYPE,
         String.class,
-        strArray.getClass(),
+        String[].class,
         BigDecimal.class,
         BigInteger.class,
         ObjectName.class,
-        objNameArray.getClass(),
+        Object[].class,
         java.io.File.class,
     };
 

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=1238326&r1=1238325&r2=1238326&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 Jan 31 09:33:30 2012
@@ -35,7 +35,7 @@ public class MbeansDescriptorsSerSource 
     private static final Log log = LogFactory.getLog(MbeansDescriptorsSerSource.class);
     private Registry registry;
     private String type;
-    private List<ObjectName> mbeans=new ArrayList<ObjectName>();
+    private final List<ObjectName> mbeans=new ArrayList<ObjectName>();
 
     public void setRegistry(Registry reg) {
         this.registry=reg;



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


Mime
View raw message