Author: markt
Date: Wed Feb 20 11:54:55 2013
New Revision: 1448108

URL: http://svn.apache.org/r1448108
Log:
Tomcat doesn't use .ser files for MBeans

Removed:
    
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
Modified:
    tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java

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=1448108&r1=1448107&r2=1448108&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java Wed Feb 20 
11:54:55 2013
@@ -553,15 +553,15 @@ public class Registry implements Registr
             location=url.toString();
             type=param;
             inputsource=url.openStream();
-            if( sourceType == null ) {
-                sourceType = sourceTypeFromExt(location);
+            if (sourceType == null && location.endsWith(".xml")) {
+                sourceType = "MbeansDescriptorsDigesterSource";
             }
         } else if( source instanceof File ) {
             location=((File)source).getAbsolutePath();
             inputsource=new FileInputStream((File)source);
             type=param;
-            if( sourceType == null ) {
-                sourceType = sourceTypeFromExt(location);
+            if (sourceType == null && location.endsWith(".xml")) {
+                sourceType = "MbeansDescriptorsDigesterSource";
             }
         } else if( source instanceof InputStream ) {
             type=param;
@@ -585,15 +585,6 @@ public class Registry implements Registr
         return mbeans;
     }
 
-    private String sourceTypeFromExt( String s ) {
-        if( s.endsWith( ".ser")) {
-            return "MbeansDescriptorsSerSource";
-        }
-        else if( s.endsWith(".xml")) {
-            return "MbeansDescriptorsDigesterSource";
-        }
-        return null;
-    }
 
     /** Register a component
      * XXX make it private



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to