From: markt Date: Wed, 19 Nov 2008 00:39:04 +0000 (+0000) Subject: Remove deprecated methods. (In a few places public methods become private) X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=585efa924174cc8db2586824a9d3f12aa51041da;p=tomcat7.0 Remove deprecated methods. (In a few places public methods become private) In the few places they are used, replace the call to the deprecated method with an appropriate alternative. Should be no functional change. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@718819 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java index a3f6bff76..ea164fae8 100644 --- a/java/org/apache/catalina/connector/CoyoteAdapter.java +++ b/java/org/apache/catalina/connector/CoyoteAdapter.java @@ -626,7 +626,7 @@ public class CoyoteAdapter } if (conv != null) { try { - conv.convert(bc, cc); + conv.convert(bc, cc, cc.getBuffer().length - cc.getEnd()); uri.setChars(cc.getBuffer(), cc.getStart(), cc.getLength()); return; diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java b/java/org/apache/tomcat/util/IntrospectionUtils.java index 76066646d..2b7a0928b 100644 --- a/java/org/apache/tomcat/util/IntrospectionUtils.java +++ b/java/org/apache/tomcat/util/IntrospectionUtils.java @@ -470,22 +470,6 @@ public final class IntrospectionUtils { /** * Replace ${NAME} with the property value - * - * @deprecated Use the explicit method - */ - public static String replaceProperties(String value, Object getter) { - if (getter instanceof Hashtable) - return replaceProperties(value, (Hashtable) getter, null); - - if (getter instanceof PropertySource) { - PropertySource src[] = new PropertySource[] { (PropertySource) getter }; - return replaceProperties(value, null, src); - } - return value; - } - - /** - * Replace ${NAME} with the property value */ public static String replaceProperties(String value, Hashtable staticProp, PropertySource dynamicProp[]) { diff --git a/java/org/apache/tomcat/util/buf/B2CConverter.java b/java/org/apache/tomcat/util/buf/B2CConverter.java index 995476b3e..5bf66bf3e 100644 --- a/java/org/apache/tomcat/util/buf/B2CConverter.java +++ b/java/org/apache/tomcat/util/buf/B2CConverter.java @@ -67,16 +67,6 @@ public class B2CConverter { static final int BUFFER_SIZE=8192; char result[]=new char[BUFFER_SIZE]; - /** Convert a buffer of bytes into a chars - * @deprecated - */ - public void convert( ByteChunk bb, CharChunk cb ) - throws IOException - { - // Set the ByteChunk as input to the Intermediate reader - convert(bb, cb, cb.getBuffer().length - cb.getEnd()); - } - public void convert( ByteChunk bb, CharChunk cb, int limit) throws IOException diff --git a/java/org/apache/tomcat/util/buf/MessageBytes.java b/java/org/apache/tomcat/util/buf/MessageBytes.java index 4e35b43e0..42db3c515 100644 --- a/java/org/apache/tomcat/util/buf/MessageBytes.java +++ b/java/org/apache/tomcat/util/buf/MessageBytes.java @@ -68,10 +68,10 @@ public final class MessageBytes implements Cloneable, Serializable { /** * Creates a new, uninitialized MessageBytes object. - * @deprecated Use static newInstance() in order to allow + * Use static newInstance() in order to allow * future hooks. */ - public MessageBytes() { + private MessageBytes() { } /** Construct a new MessageBytes instance diff --git a/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java b/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java index d3f131c65..a01dfa464 100644 --- a/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java +++ b/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java @@ -132,22 +132,6 @@ abstract public class AbstractRulesImpl implements Rules { * in the order originally registered through the add() * method. * - * @param pattern Nesting pattern to be matched - * - * @deprecated Call match(namespaceURI,pattern) instead. - */ - public List match(String pattern) { - return match(namespaceURI, pattern); - } - - - /** - * Return a List of all registered Rule instances that match the specified - * nesting pattern, or a zero-length List if there are no matches. If more - * than one Rule instance matches, they must be returned - * in the order originally registered through the add() - * method. - * * @param namespaceURI Namespace URI for which to select matching rules, * or null to match regardless of namespace URI * @param pattern Nesting pattern to be matched diff --git a/java/org/apache/tomcat/util/digester/CallMethodRule.java b/java/org/apache/tomcat/util/digester/CallMethodRule.java index 20c2039ce..adb6e5b87 100644 --- a/java/org/apache/tomcat/util/digester/CallMethodRule.java +++ b/java/org/apache/tomcat/util/digester/CallMethodRule.java @@ -74,73 +74,6 @@ public class CallMethodRule extends Rule { * Construct a "call method" rule with the specified method name. The * parameter types (if any) default to java.lang.String. * - * @param digester The associated Digester - * @param methodName Method name of the parent method to call - * @param paramCount The number of parameters to collect, or - * zero for a single argument from the body of this element. - * - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #CallMethodRule(String methodName,int paramCount)} instead. - */ - public CallMethodRule(Digester digester, String methodName, - int paramCount) { - - this(methodName, paramCount); - - } - - - /** - * Construct a "call method" rule with the specified method name. - * - * @param digester The associated Digester - * @param methodName Method name of the parent method to call - * @param paramCount The number of parameters to collect, or - * zero for a single argument from the body of ths element - * @param paramTypes The Java class names of the arguments - * (if you wish to use a primitive type, specify the corresonding - * Java wrapper class instead, such as java.lang.Boolean - * for a boolean parameter) - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #CallMethodRule(String methodName,int paramCount, String [] paramTypes)} instead. - */ - public CallMethodRule(Digester digester, String methodName, - int paramCount, String paramTypes[]) { - - this(methodName, paramCount, paramTypes); - - } - - - /** - * Construct a "call method" rule with the specified method name. - * - * @param digester The associated Digester - * @param methodName Method name of the parent method to call - * @param paramCount The number of parameters to collect, or - * zero for a single argument from the body of ths element - * @param paramTypes The Java classes that represent the - * parameter types of the method arguments - * (if you wish to use a primitive type, specify the corresonding - * Java wrapper class instead, such as java.lang.Boolean.TYPE - * for a boolean parameter) - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #CallMethodRule(String methodName,int paramCount, Class [] paramTypes)} instead. - */ - public CallMethodRule(Digester digester, String methodName, - int paramCount, Class paramTypes[]) { - - this(methodName, paramCount, paramTypes); - } - - - /** - * Construct a "call method" rule with the specified method name. The - * parameter types (if any) default to java.lang.String. - * * @param methodName Method name of the parent method to call * @param paramCount The number of parameters to collect, or * zero for a single argument from the body of this element. diff --git a/java/org/apache/tomcat/util/digester/CallParamRule.java b/java/org/apache/tomcat/util/digester/CallParamRule.java index 7f804610d..2cbf77d66 100644 --- a/java/org/apache/tomcat/util/digester/CallParamRule.java +++ b/java/org/apache/tomcat/util/digester/CallParamRule.java @@ -50,41 +50,6 @@ public class CallParamRule extends Rule { * Construct a "call parameter" rule that will save the body text of this * element as the parameter value. * - * @param digester The associated Digester - * @param paramIndex The zero-relative parameter number - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #CallParamRule(int paramIndex)} instead. - */ - public CallParamRule(Digester digester, int paramIndex) { - - this(paramIndex); - - } - - - /** - * Construct a "call parameter" rule that will save the value of the - * specified attribute as the parameter value. - * - * @param digester The associated Digester - * @param paramIndex The zero-relative parameter number - * @param attributeName The name of the attribute to save - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #CallParamRule(int paramIndex, String attributeName)} instead. - */ - public CallParamRule(Digester digester, int paramIndex, - String attributeName) { - - this(paramIndex, attributeName); - - } - - /** - * Construct a "call parameter" rule that will save the body text of this - * element as the parameter value. - * * @param paramIndex The zero-relative parameter number */ public CallParamRule(int paramIndex) { diff --git a/java/org/apache/tomcat/util/digester/Digester.java b/java/org/apache/tomcat/util/digester/Digester.java index 6e88381ee..7e186a19c 100644 --- a/java/org/apache/tomcat/util/digester/Digester.java +++ b/java/org/apache/tomcat/util/digester/Digester.java @@ -206,13 +206,6 @@ public class Digester extends DefaultHandler { protected SAXParserFactory factory = null; /** - * @deprecated This is now managed by {@link ParserFeatureSetterFactory} - */ - protected String JAXP_SCHEMA_LANGUAGE = - "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; - - - /** * The Locator associated with our parser. */ protected Locator locator = null; @@ -443,37 +436,6 @@ public class Digester extends DefaultHandler { /** - * Return the debugging detail level of our currently enabled logger. - * - * @deprecated This method now always returns 0. Digester uses the apache - * jakarta commons-logging library; see the documentation for that library - * for more information. - */ - public int getDebug() { - - return (0); - - } - - - /** - * Set the debugging detail level of our currently enabled logger. - * - * @param debug New debugging detail level (0=off, increasing integers - * for more detail) - * - * @deprecated This method now has no effect at all. Digester uses - * the apache jakarta comons-logging library; see the documentation - * for that library for more information. - */ - public void setDebug(int debug) { - - ; // No action is taken - - } - - - /** * Return the error handler for this Digester. */ public ErrorHandler getErrorHandler() { @@ -764,25 +726,6 @@ public class Digester extends DefaultHandler { /** - * By setting the reader in the constructor, you can bypass JAXP and - * be able to use digester in Weblogic 6.0. - * - * @deprecated Use getXMLReader() instead, which can throw a - * SAXException if the reader cannot be instantiated - */ - public XMLReader getReader() { - - try { - return (getXMLReader()); - } catch (SAXException e) { - log.error("Cannot get XMLReader", e); - return (null); - } - - } - - - /** * Return the Rules implementation object containing our * rules collection and associated matching policy. If none has been * established, a default implementation will be created and returned. @@ -1590,32 +1533,6 @@ public class Digester extends DefaultHandler { /** - * Log a message to our associated logger. - * - * @param message The message to be logged - * @deprecated Call getLogger() and use it's logging methods - */ - public void log(String message) { - - log.info(message); - - } - - - /** - * Log a message and exception to our associated logger. - * - * @param message The message to be logged - * @deprecated Call getLogger() and use it's logging methods - */ - public void log(String message, Throwable exception) { - - log.error(message, exception); - - } - - - /** * Parse the content of the specified file using this Digester. Returns * the root element from the object stack (if any). * @@ -2692,26 +2609,6 @@ public class Digester extends DefaultHandler { /** - * Return the set of rules that apply to the specified match position. - * The selected rules are those that match exactly, or those rules - * that specify a suffix match and the tail of the rule matches the - * current match position. Exact matches have precedence over - * suffix matches, then (among suffix matches) the longest match - * is preferred. - * - * @param match The current match position - * - * @deprecated Call match() on the Rules - * implementation returned by getRules() - */ - List getRules(String match) { - - return (getRules().match(match)); - - } - - - /** *

Return the top object on the parameters stack without removing it. If there are * no objects on the stack, return null.

* diff --git a/java/org/apache/tomcat/util/digester/FactoryCreateRule.java b/java/org/apache/tomcat/util/digester/FactoryCreateRule.java index 5634a4ec5..c71ef7989 100644 --- a/java/org/apache/tomcat/util/digester/FactoryCreateRule.java +++ b/java/org/apache/tomcat/util/digester/FactoryCreateRule.java @@ -46,103 +46,6 @@ public class FactoryCreateRule extends Rule { /** - * Construct a factory create rule that will use the specified - * class name to create an {@link ObjectCreationFactory} which will - * then be used to create an object and push it on the stack. - * - * @param digester The associated Digester - * @param className Java class name of the object creation factory class - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #FactoryCreateRule(String className)} instead. - */ - public FactoryCreateRule(Digester digester, String className) { - - this(className); - - } - - - /** - * Construct a factory create rule that will use the specified - * class to create an {@link ObjectCreationFactory} which will - * then be used to create an object and push it on the stack. - * - * @param digester The associated Digester - * @param clazz Java class name of the object creation factory class - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #FactoryCreateRule(Class clazz)} instead. - */ - public FactoryCreateRule(Digester digester, Class clazz) { - - this(clazz); - - } - - - /** - * Construct a factory create rule that will use the specified - * class name (possibly overridden by the specified attribute if present) - * to create an {@link ObjectCreationFactory}, which will then be used - * to instantiate an object instance and push it onto the stack. - * - * @param digester The associated Digester - * @param className Default Java class name of the factory class - * @param attributeName Attribute name which, if present, contains an - * override of the class name of the object creation factory to create. - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #FactoryCreateRule(String className, String attributeName)} instead. - */ - public FactoryCreateRule(Digester digester, - String className, String attributeName) { - - this(className, attributeName); - - } - - - /** - * Construct a factory create rule that will use the specified - * class (possibly overridden by the specified attribute if present) - * to create an {@link ObjectCreationFactory}, which will then be used - * to instantiate an object instance and push it onto the stack. - * - * @param digester The associated Digester - * @param clazz Default Java class name of the factory class - * @param attributeName Attribute name which, if present, contains an - * override of the class name of the object creation factory to create. - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #FactoryCreateRule(Class clazz, String attributeName)} instead. - */ - public FactoryCreateRule(Digester digester, - Class clazz, String attributeName) { - - this(clazz, attributeName); - - } - - - /** - * Construct a factory create rule using the given, already instantiated, - * {@link ObjectCreationFactory}. - * - * @param digester The associated Digester - * @param creationFactory called on to create the object. - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #FactoryCreateRule(ObjectCreationFactory creationFactory)} instead. - */ - public FactoryCreateRule(Digester digester, - ObjectCreationFactory creationFactory) { - - this(creationFactory); - - } - - /** *

Construct a factory create rule that will use the specified * class name to create an {@link ObjectCreationFactory} which will * then be used to create an object and push it on the stack.

diff --git a/java/org/apache/tomcat/util/digester/ObjectCreateRule.java b/java/org/apache/tomcat/util/digester/ObjectCreateRule.java index d1c4fe40f..def594e2d 100644 --- a/java/org/apache/tomcat/util/digester/ObjectCreateRule.java +++ b/java/org/apache/tomcat/util/digester/ObjectCreateRule.java @@ -38,78 +38,6 @@ public class ObjectCreateRule extends Rule { /** * Construct an object create rule with the specified class name. * - * @param digester The associated Digester - * @param className Java class name of the object to be created - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #ObjectCreateRule(String className)} instead. - */ - public ObjectCreateRule(Digester digester, String className) { - - this(className); - - } - - - /** - * Construct an object create rule with the specified class. - * - * @param digester The associated Digester - * @param clazz Java class name of the object to be created - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #ObjectCreateRule(Class clazz)} instead. - */ - public ObjectCreateRule(Digester digester, Class clazz) { - - this(clazz); - - } - - - /** - * Construct an object create rule with the specified class name and an - * optional attribute name containing an override. - * - * @param digester The associated Digester - * @param className Java class name of the object to be created - * @param attributeName Attribute name which, if present, contains an - * override of the class name to create - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #ObjectCreateRule(String className, String attributeName)} instead. - */ - public ObjectCreateRule(Digester digester, String className, - String attributeName) { - - this (className, attributeName); - - } - - - /** - * Construct an object create rule with the specified class and an - * optional attribute name containing an override. - * - * @param digester The associated Digester - * @param attributeName Attribute name which, if present, contains an - * @param clazz Java class name of the object to be created - * override of the class name to create - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #ObjectCreateRule(String attributeName, Class clazz)} instead. - */ - public ObjectCreateRule(Digester digester, - String attributeName, - Class clazz) { - - this(attributeName, clazz); - - } - - /** - * Construct an object create rule with the specified class name. - * * @param className Java class name of the object to be created */ public ObjectCreateRule(String className) { diff --git a/java/org/apache/tomcat/util/digester/Rule.java b/java/org/apache/tomcat/util/digester/Rule.java index c20239cd0..ffb10fa80 100644 --- a/java/org/apache/tomcat/util/digester/Rule.java +++ b/java/org/apache/tomcat/util/digester/Rule.java @@ -35,19 +35,6 @@ public abstract class Rule { /** - * Constructor sets the associated Digester. - * - * @param digester The digester with which this rule is associated - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. Use {@link #Rule()} instead. - */ - public Rule(Digester digester) { - - super(); - setDigester(digester); - - } - - /** *

Base constructor. * Now the digester will be set when the rule is added.

*/ @@ -118,22 +105,6 @@ public abstract class Rule { /** * This method is called when the beginning of a matching XML element - * is encountered. - * - * @param attributes The attribute list of this element - * @deprecated Use the {@link #begin(String,String,Attributes) begin} - * method with namespace and name - * parameters instead. - */ - public void begin(Attributes attributes) throws Exception { - - ; // The default implementation does nothing - - } - - - /** - * This method is called when the beginning of a matching XML element * is encountered. The default implementation delegates to the deprecated * method {@link #begin(Attributes) begin} without the * namespace and name parameters, to retain @@ -150,24 +121,7 @@ public abstract class Rule { public void begin(String namespace, String name, Attributes attributes) throws Exception { - begin(attributes); - - } - - - /** - * This method is called when the body of a matching XML element - * is encountered. If the element has no body, this method is - * not called at all. - * - * @param text The text of the body of this element - * @deprecated Use the {@link #body(String,String,String) body} method - * with namespace and name parameters - * instead. - */ - public void body(String text) throws Exception { - - ; // The default implementation does nothing + // The default implementation does nothing } @@ -190,21 +144,7 @@ public abstract class Rule { public void body(String namespace, String name, String text) throws Exception { - body(text); - - } - - - /** - * This method is called when the end of a matching XML element - * is encountered. - * - * @deprecated Use the {@link #end(String,String) end} method with - * namespace and name parameters instead. - */ - public void end() throws Exception { - - ; // The default implementation does nothing + // The default implementation does nothing } @@ -226,7 +166,7 @@ public abstract class Rule { public void end(String namespace, String name) throws Exception { - end(); + // The default implementation does nothing } diff --git a/java/org/apache/tomcat/util/digester/Rules.java b/java/org/apache/tomcat/util/digester/Rules.java index 13d9ed93c..37878bcb6 100644 --- a/java/org/apache/tomcat/util/digester/Rules.java +++ b/java/org/apache/tomcat/util/digester/Rules.java @@ -94,20 +94,6 @@ public interface Rules { * in the order originally registered through the add() * method. * - * @param pattern Nesting pattern to be matched - * - * @deprecated Call match(namespaceURI,pattern) instead. - */ - public List match(String pattern); - - - /** - * Return a List of all registered Rule instances that match the specified - * nesting pattern, or a zero-length List if there are no matches. If more - * than one Rule instance matches, they must be returned - * in the order originally registered through the add() - * method. - * * @param namespaceURI Namespace URI for which to select matching rules, * or null to match regardless of namespace URI * @param pattern Nesting pattern to be matched diff --git a/java/org/apache/tomcat/util/digester/RulesBase.java b/java/org/apache/tomcat/util/digester/RulesBase.java index dd2375757..b9c4471a8 100644 --- a/java/org/apache/tomcat/util/digester/RulesBase.java +++ b/java/org/apache/tomcat/util/digester/RulesBase.java @@ -188,24 +188,6 @@ public class RulesBase implements Rules { * in the order originally registered through the add() * method. * - * @param pattern Nesting pattern to be matched - * - * @deprecated Call match(namespaceURI,pattern) instead. - */ - public List match(String pattern) { - - return (match(null, pattern)); - - } - - - /** - * Return a List of all registered Rule instances that match the specified - * nesting pattern, or a zero-length List if there are no matches. If more - * than one Rule instance matches, they must be returned - * in the order originally registered through the add() - * method. - * * @param namespaceURI Namespace URI for which to select matching rules, * or null to match regardless of namespace URI * @param pattern Nesting pattern to be matched diff --git a/java/org/apache/tomcat/util/digester/SetNextRule.java b/java/org/apache/tomcat/util/digester/SetNextRule.java index 54063003f..1e6c9f43b 100644 --- a/java/org/apache/tomcat/util/digester/SetNextRule.java +++ b/java/org/apache/tomcat/util/digester/SetNextRule.java @@ -44,44 +44,6 @@ public class SetNextRule extends Rule { * method's argument type is assumed to be the class of the * child object. * - * @param digester The associated Digester - * @param methodName Method name of the parent method to call - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #SetNextRule(String methodName)} instead. - */ - public SetNextRule(Digester digester, String methodName) { - - this(methodName); - - } - - - /** - * Construct a "set next" rule with the specified method name. - * - * @param digester The associated Digester - * @param methodName Method name of the parent method to call - * @param paramType Java class of the parent method's argument - * (if you wish to use a primitive type, specify the corresonding - * Java wrapper class instead, such as java.lang.Boolean - * for a boolean parameter) - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #SetNextRule(String methodName,String paramType)} instead. - */ - public SetNextRule(Digester digester, String methodName, - String paramType) { - - this(methodName, paramType); - - } - - /** - * Construct a "set next" rule with the specified method name. The - * method's argument type is assumed to be the class of the - * child object. - * * @param methodName Method name of the parent method to call */ public SetNextRule(String methodName) { diff --git a/java/org/apache/tomcat/util/digester/SetPropertiesRule.java b/java/org/apache/tomcat/util/digester/SetPropertiesRule.java index e68bbf1d2..744f851d2 100644 --- a/java/org/apache/tomcat/util/digester/SetPropertiesRule.java +++ b/java/org/apache/tomcat/util/digester/SetPropertiesRule.java @@ -42,21 +42,6 @@ public class SetPropertiesRule extends Rule { /** - * Default constructor sets only the the associated Digester. - * - * @param digester The digester with which this rule is associated - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #SetPropertiesRule()} instead. - */ - public SetPropertiesRule(Digester digester) { - - this(); - - } - - - /** * Base constructor. */ public SetPropertiesRule() { diff --git a/java/org/apache/tomcat/util/digester/SetPropertyRule.java b/java/org/apache/tomcat/util/digester/SetPropertyRule.java index f4b133ed7..2d0970765 100644 --- a/java/org/apache/tomcat/util/digester/SetPropertyRule.java +++ b/java/org/apache/tomcat/util/digester/SetPropertyRule.java @@ -39,25 +39,6 @@ public class SetPropertyRule extends Rule { * Construct a "set property" rule with the specified name and value * attributes. * - * @param digester The digester with which this rule is associated - * @param name Name of the attribute that will contain the name of the - * property to be set - * @param value Name of the attribute that will contain the value to which - * the property should be set - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #SetPropertyRule(String name, String value)} instead. - */ - public SetPropertyRule(Digester digester, String name, String value) { - - this(name, value); - - } - - /** - * Construct a "set property" rule with the specified name and value - * attributes. - * * @param name Name of the attribute that will contain the name of the * property to be set * @param value Name of the attribute that will contain the value to which diff --git a/java/org/apache/tomcat/util/digester/SetRootRule.java b/java/org/apache/tomcat/util/digester/SetRootRule.java index b801c5052..be18c5977 100644 --- a/java/org/apache/tomcat/util/digester/SetRootRule.java +++ b/java/org/apache/tomcat/util/digester/SetRootRule.java @@ -44,44 +44,6 @@ public class SetRootRule extends Rule { * method's argument type is assumed to be the class of the * child object. * - * @param digester The associated Digester - * @param methodName Method name of the parent method to call - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #SetRootRule(String methodName)} instead. - */ - public SetRootRule(Digester digester, String methodName) { - - this(methodName); - - } - - - /** - * Construct a "set root" rule with the specified method name. - * - * @param digester The associated Digester - * @param methodName Method name of the parent method to call - * @param paramType Java class of the parent method's argument - * (if you wish to use a primitive type, specify the corresonding - * Java wrapper class instead, such as java.lang.Boolean - * for a boolean parameter) - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #SetRootRule(String methodName,String paramType)} instead. - */ - public SetRootRule(Digester digester, String methodName, - String paramType) { - - this(methodName, paramType); - - } - - /** - * Construct a "set root" rule with the specified method name. The - * method's argument type is assumed to be the class of the - * child object. - * * @param methodName Method name of the parent method to call */ public SetRootRule(String methodName) { diff --git a/java/org/apache/tomcat/util/digester/SetTopRule.java b/java/org/apache/tomcat/util/digester/SetTopRule.java index 08500cda3..5bc956a62 100644 --- a/java/org/apache/tomcat/util/digester/SetTopRule.java +++ b/java/org/apache/tomcat/util/digester/SetTopRule.java @@ -44,44 +44,6 @@ public class SetTopRule extends Rule { * "set parent" method's argument type is assumed to be the class of the * parent object. * - * @param digester The associated Digester - * @param methodName Method name of the "set parent" method to call - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #SetTopRule(String methodName)} instead. - */ - public SetTopRule(Digester digester, String methodName) { - - this(methodName); - - } - - - /** - * Construct a "set parent" rule with the specified method name. - * - * @param digester The associated Digester - * @param methodName Method name of the "set parent" method to call - * @param paramType Java class of the "set parent" method's argument - * (if you wish to use a primitive type, specify the corresonding - * Java wrapper class instead, such as java.lang.Boolean - * for a boolean parameter) - * - * @deprecated The digester instance is now set in the {@link Digester#addRule} method. - * Use {@link #SetTopRule(String methodName, String paramType)} instead. - */ - public SetTopRule(Digester digester, String methodName, - String paramType) { - - this(methodName, paramType); - - } - - /** - * Construct a "set parent" rule with the specified method name. The - * "set parent" method's argument type is assumed to be the class of the - * parent object. - * * @param methodName Method name of the "set parent" method to call */ public SetTopRule(String methodName) { diff --git a/java/org/apache/tomcat/util/http/ServerCookie.java b/java/org/apache/tomcat/util/http/ServerCookie.java index 6309561d7..e3a1595e3 100644 --- a/java/org/apache/tomcat/util/http/ServerCookie.java +++ b/java/org/apache/tomcat/util/http/ServerCookie.java @@ -211,26 +211,6 @@ public class ServerCookie implements Serializable { return true; } - /** - * @deprecated - Not used - */ - public static boolean checkName( String name ) { - if (!isToken(name) - || name.equalsIgnoreCase("Comment") // rfc2019 - || name.equalsIgnoreCase("Discard") // rfc2965 - || name.equalsIgnoreCase("Domain") // rfc2019 - || name.equalsIgnoreCase("Expires") // Netscape - || name.equalsIgnoreCase("Max-Age") // rfc2019 - || name.equalsIgnoreCase("Path") // rfc2019 - || name.equalsIgnoreCase("Secure") // rfc2019 - || name.equalsIgnoreCase("Version") // rfc2019 - // TODO remaining RFC2965 attributes - ) { - return false; - } - return true; - } - // -------------------- Cookie parsing tools @@ -344,21 +324,6 @@ public class ServerCookie implements Serializable { headerBuf.append(buf); } - /** - * @deprecated - Not used - */ - @Deprecated - public static void maybeQuote (int version, StringBuffer buf,String value) { - // special case - a \n or \r shouldn't happen in any case - if (isToken(value)) { - buf.append(value); - } else { - buf.append('"'); - buf.append(escapeDoubleQuotes(value,0,value.length())); - buf.append('"'); - } - } - public static boolean alreadyQuoted (String value) { if (value==null || value.length()==0) return false; return (value.charAt(0)=='\"' && value.charAt(value.length()-1)=='\"'); diff --git a/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java b/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java index 860e630c1..2cf3ad20e 100644 --- a/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java +++ b/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java @@ -224,7 +224,7 @@ public class BaseNotificationBroadcaster implements NotificationBroadcaster { private synchronized void registerNotifications( FixedNotificationFilter filter ) { String names[]=filter.getNames(); - Registry reg=Registry.getRegistry(); + Registry reg=Registry.getRegistry(null, null); for( int i=0; iMBeanServer instance. - * - * @since 1.0 - * @deprecated Use the instance method - */ - public static MBeanServer getServer() { - return Registry.getRegistry().getMBeanServer(); - } - - /** - * Set the MBeanServer to be utilized for our - * registered management beans. - * - * @param mbeanServer The new MBeanServer instance - * @since 1.0 - * @deprecated Use the instance method - */ - public static void setServer(MBeanServer mbeanServer) { - Registry.getRegistry().setMBeanServer(mbeanServer); - } - - /** - * Load the registry from the XML input found in the specified input - * stream. - * - * @param stream InputStream containing the registry configuration - * information - * - * @exception Exception if any parsing or processing error occurs - * @deprecated use normal class method instead - * @since 1.0 - */ - public static void loadRegistry(InputStream stream) throws Exception { - Registry registry = getRegistry(); - registry.loadMetadata(stream); - } - - /** Get a "singelton" registry, or one per thread if setUseContextLoader - * was called - * - * @deprecated Not enough info - use the method that takes CL and domain - * @since 1.0 - */ - public synchronized static Registry getRegistry() { - return getRegistry(null, null); - } - // -------------------- Helpers -------------------- /** Get the type of an attribute of the object, from the metadata. @@ -847,15 +796,13 @@ public class Registry implements RegistryMBean, MBeanRegistration { return; } - /**Experimental. Will become private, some code may still use it - * + /** * @param sourceType * @param source * @param param * @throws Exception - * @deprecated */ - public void loadDescriptors(String sourceType, Object source, String param) + private void loadDescriptors(String sourceType, Object source, String param) throws Exception { load(sourceType, source, param); } @@ -961,6 +908,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { public void resetMetadata() { stop(); } + /** * Load the registry from the XML input found in the specified input * stream. @@ -975,22 +923,6 @@ public class Registry implements RegistryMBean, MBeanRegistration { loadDescriptors("MbeansDescriptorsDigesterSource", source, null ); } - /** @deprecated - may still be used in code using pre-1.1 builds - */ - public void registerComponent(Object bean, String domain, String type, - String name) - throws Exception - { - StringBuffer sb=new StringBuffer(); - sb.append( domain ).append(":"); - sb.append( name ); - String nameStr=sb.toString(); - ObjectName oname=new ObjectName( nameStr ); - registerComponent(bean, oname, type ); - } - - - // should be removed public void unregisterComponent( String domain, String name ) { try { @@ -1003,19 +935,4 @@ public class Registry implements RegistryMBean, MBeanRegistration { } } - - /** - * Load the registry from a cached .ser file. This is typically 2-3 times - * faster than parsing the XML. - * - * @param source Source to be used to load. Can be an InputStream or URL. - * - * @exception Exception if any parsing or processing error occurs - * @deprecated Loaded automatically or using a File or Url ending in .ser - */ - public void loadCachedDescriptors( Object source ) - throws Exception - { - loadDescriptors("MbeansDescriptorsSerSource", source, null ); - } } diff --git a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java index f108d9f30..6429e76ae 100644 --- a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java +++ b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java @@ -80,7 +80,7 @@ public class MbeansDescriptorsDOMSource extends ModelerSource } public void execute() throws Exception { - if( registry==null ) registry=Registry.getRegistry(); + if( registry==null ) registry=Registry.getRegistry(null, null); try { InputStream stream=(InputStream)source; diff --git a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java index 94ed10fbe..b1813ca05 100644 --- a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java +++ b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java @@ -77,7 +77,7 @@ public class MbeansDescriptorsIntrospectionSource extends ModelerSource } public void execute() throws Exception { - if( registry==null ) registry=Registry.getRegistry(); + if( registry==null ) registry=Registry.getRegistry(null, null); try { ManagedBean managed = createManagedBean(registry, null, (Class)source, type); diff --git a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java index 53a302f31..10a73f834 100644 --- a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java +++ b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java @@ -70,7 +70,7 @@ public class MbeansDescriptorsSerSource extends ModelerSource } public void execute() throws Exception { - if( registry==null ) registry=Registry.getRegistry(); + if( registry==null ) registry=Registry.getRegistry(null, null); long t1=System.currentTimeMillis(); try { InputStream stream=null; diff --git a/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java b/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java index 7362006b1..c95e52dd5 100644 --- a/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java +++ b/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java @@ -123,7 +123,7 @@ public class MbeansSource extends ModelerSource implements MbeansSourceMBean public void init() throws Exception { if( mbeans==null) execute(); - if( registry==null ) registry=Registry.getRegistry(); + if( registry==null ) registry=Registry.getRegistry(null, null); registry.invoke(mbeans, "init", false); } @@ -137,7 +137,7 @@ public class MbeansSource extends ModelerSource implements MbeansSourceMBean } public void execute() throws Exception { - if( registry==null ) registry=Registry.getRegistry(); + if( registry==null ) registry=Registry.getRegistry(null, null); try { InputStream stream=getInputStream(); long t1=System.currentTimeMillis(); @@ -160,7 +160,8 @@ public class MbeansSource extends ModelerSource implements MbeansSourceMBean firstMbeanN=descriptorsN; } - MBeanServer server = Registry.getServer(); + MBeanServer server = + Registry.getRegistry(null, null).getMBeanServer(); // XXX Not very clean... Just a workaround if( ! loaderLoaded ) { diff --git a/java/org/apache/tomcat/util/net/TcpConnectionHandler.java b/java/org/apache/tomcat/util/net/TcpConnectionHandler.java index b9096d4ca..686d55f0d 100644 --- a/java/org/apache/tomcat/util/net/TcpConnectionHandler.java +++ b/java/org/apache/tomcat/util/net/TcpConnectionHandler.java @@ -28,22 +28,6 @@ package org.apache.tomcat.util.net; */ public interface TcpConnectionHandler { - /** Add informations about the a "controler" object - * specific to the server. In tomcat it will be a - * ContextManager. - * @deprecated This has nothing to do with TcpHandling, - * was used as a workaround - */ - public void setServer(Object manager); - - - /** Used to pass config informations to the handler. - * - * @deprecated This has nothing to do with Tcp, - * was used as a workaround. - */ - public void setAttribute(String name, Object value ); - /** Called before the call to processConnection. * If the thread is reused, init() should be called once per thread. * diff --git a/java/org/apache/tomcat/util/threads/ThreadPool.java b/java/org/apache/tomcat/util/threads/ThreadPool.java index 899005fa1..e11810c69 100644 --- a/java/org/apache/tomcat/util/threads/ThreadPool.java +++ b/java/org/apache/tomcat/util/threads/ThreadPool.java @@ -525,12 +525,6 @@ public class ThreadPool { currentThreadCount = toOpen; } - /** @deprecated */ - void log( String s ) { - log.info(s); - //loghelper.flush(); - } - /** * Periodically execute an action - cleanup in this case */