Author: markt Date: Tue Jan 31 09:31:06 2012 New Revision: 1238322 URL: http://svn.apache.org/viewvc?rev=1238322&view=rev Log: Deprecate unused code
Modified: 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/modeler/modules/ModelerSource.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=1238322&r1=1238321&r2=1238322&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java Tue Jan 31 09:31:06 2012 @@ -582,7 +582,7 @@ public class Registry implements Registr } ModelerSource ds=getModelerSource(sourceType); List<ObjectName> mbeans = - ds.loadDescriptors(this, location, type, inputsource); + ds.loadDescriptors(this, type, inputsource); return mbeans; } 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=1238322&r1=1238321&r2=1238322&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:31:06 2012 @@ -38,9 +38,7 @@ public class MbeansDescriptorsDigesterSo LogFactory.getLog(MbeansDescriptorsDigesterSource.class); Registry registry; - String location; String type; - Object source; List<ObjectName> mbeans = new ArrayList<ObjectName>(); protected static volatile Digester digester = null; @@ -138,6 +136,11 @@ public class MbeansDescriptorsDigesterSo this.registry=reg; } + + /** + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ + @Deprecated public void setLocation( String loc ) { this.location=loc; } @@ -155,10 +158,16 @@ public class MbeansDescriptorsDigesterSo } @Override + @Deprecated public List<ObjectName> loadDescriptors( Registry registry, String location, String type, Object source) throws Exception { + return loadDescriptors(registry, type, source); + } + + @Override + public List<ObjectName> loadDescriptors( Registry registry, String type, + Object source) throws Exception { setRegistry(registry); - setLocation(location); setType(type); setSource(source); execute(); 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=1238322&r1=1238321&r2=1238322&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:31:06 2012 @@ -41,15 +41,17 @@ public class MbeansDescriptorsIntrospect private static final Log log = LogFactory.getLog(MbeansDescriptorsIntrospectionSource.class); Registry registry; - String location; String type; - Object source; List<ObjectName> mbeans = new ArrayList<ObjectName>(); public void setRegistry(Registry reg) { this.registry=reg; } + /** + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ + @Deprecated public void setLocation( String loc ) { this.location=loc; } @@ -67,10 +69,16 @@ public class MbeansDescriptorsIntrospect } @Override + @Deprecated public List<ObjectName> loadDescriptors( Registry registry, String location, String type, Object source) throws Exception { + return loadDescriptors(registry, type, source); + } + + @Override + public List<ObjectName> loadDescriptors(Registry registry, String type, + Object source) throws Exception { setRegistry(registry); - setLocation(location); setType(type); setSource(source); execute(); 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=1238322&r1=1238321&r2=1238322&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:31:06 2012 @@ -34,15 +34,17 @@ public class MbeansDescriptorsSerSource { private static final Log log = LogFactory.getLog(MbeansDescriptorsSerSource.class); Registry registry; - String location; String type; - Object source; List<ObjectName> mbeans=new ArrayList<ObjectName>(); public void setRegistry(Registry reg) { this.registry=reg; } + /** + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ + @Deprecated public void setLocation( String loc ) { this.location=loc; } @@ -60,10 +62,16 @@ public class MbeansDescriptorsSerSource } @Override + @Deprecated public List<ObjectName> loadDescriptors( Registry registry, String location, String type, Object source) throws Exception { + return loadDescriptors(registry, type, source); + } + + @Override + public List<ObjectName> loadDescriptors( Registry registry, String type, + Object source) throws Exception { setRegistry(registry); - setLocation(location); setType(type); setSource(source); execute(); Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java?rev=1238322&r1=1238321&r2=1238322&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/ModelerSource.java Tue Jan 31 09:31:06 2012 @@ -25,8 +25,9 @@ import org.apache.tomcat.util.modeler.Re /** Source for descriptor data. More sources can be added. * */ -public class ModelerSource { +public abstract class ModelerSource { protected Object source; + @Deprecated protected String location; /** Load data, returns a list of items. @@ -36,10 +37,17 @@ public class ModelerSource { * @param type * @param source Introspected object or some other source * @throws Exception + * + * @deprecated Location parameter is unused. Will be removed in Tomcat + * 8.0.x */ + @Deprecated public List<ObjectName> loadDescriptors( Registry registry, String location, String type, Object source) throws Exception { // TODO return null; } + + public abstract List<ObjectName> loadDescriptors(Registry registry, + String type, Object source) throws Exception; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org