From 7b3a439599c3532dcc5d8045866e78df0f13f0ba Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 21 Nov 2008 09:45:31 +0000 Subject: [PATCH] Remove deprecated code in digester (it was this bit that broke the build previously). Modify all classes that overrode deprecated methods to override the new methods. Add a note to the change log about backwards compatibility or lack thereof. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@719551 13f79535-47bb-0310-9956-ffa450edef68 --- .../catalina/startup/ConnectorCreateRule.java | 18 +++- .../apache/catalina/startup/SetNextNamingRule.java | 8 +- java/org/apache/catalina/startup/WebRuleSet.java | 39 +++++++- .../tomcat/util/digester/AbstractRulesImpl.java | 16 ---- .../tomcat/util/digester/CallMethodRule.java | 92 +++++------------- .../apache/tomcat/util/digester/CallParamRule.java | 52 +++-------- java/org/apache/tomcat/util/digester/Digester.java | 104 --------------------- .../tomcat/util/digester/FactoryCreateRule.java | 97 ------------------- .../tomcat/util/digester/NodeCreateRule.java | 8 +- .../tomcat/util/digester/ObjectCreateRule.java | 90 +++--------------- java/org/apache/tomcat/util/digester/Rule.java | 13 --- java/org/apache/tomcat/util/digester/Rules.java | 14 --- .../apache/tomcat/util/digester/SetNextRule.java | 8 +- .../tomcat/util/digester/SetPropertiesRule.java | 10 +- .../tomcat/util/digester/SetPropertyRule.java | 12 ++- .../apache/tomcat/util/digester/SetRootRule.java | 8 +- .../apache/tomcat/util/digester/SetTopRule.java | 8 +- .../util/digester/WithDefaultsRulesWrapper.java | 4 - webapps/docs/changelog.xml | 8 +- 19 files changed, 158 insertions(+), 451 deletions(-) diff --git a/java/org/apache/catalina/startup/ConnectorCreateRule.java b/java/org/apache/catalina/startup/ConnectorCreateRule.java index 06d75bc6b..58f971cd3 100644 --- a/java/org/apache/catalina/startup/ConnectorCreateRule.java +++ b/java/org/apache/catalina/startup/ConnectorCreateRule.java @@ -44,9 +44,15 @@ public class ConnectorCreateRule extends Rule { /** * Process the beginning of this element. * - * @param attributes The attribute list of this element + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise + * @param attributes The attribute list for this element */ - public void begin(Attributes attributes) throws Exception { + public void begin(String namespace, String name, Attributes attributes) + throws Exception { Service svc = (Service)digester.peek(); Executor ex = null; if ( attributes.getValue("executor")!=null ) { @@ -70,8 +76,14 @@ public class ConnectorCreateRule extends Rule { /** * Process the end of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise */ - public void end() throws Exception { + public void end(String namespace, String name) throws Exception { Object top = digester.pop(); } diff --git a/java/org/apache/catalina/startup/SetNextNamingRule.java b/java/org/apache/catalina/startup/SetNextNamingRule.java index 253d57604..139713418 100644 --- a/java/org/apache/catalina/startup/SetNextNamingRule.java +++ b/java/org/apache/catalina/startup/SetNextNamingRule.java @@ -80,8 +80,14 @@ public class SetNextNamingRule extends Rule { /** * Process the end of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise */ - public void end() throws Exception { + public void end(String namespace, String name) throws Exception { // Identify the objects to be used Object child = digester.peek(0); diff --git a/java/org/apache/catalina/startup/WebRuleSet.java b/java/org/apache/catalina/startup/WebRuleSet.java index 6bb63a91e..a65a7a288 100644 --- a/java/org/apache/catalina/startup/WebRuleSet.java +++ b/java/org/apache/catalina/startup/WebRuleSet.java @@ -747,7 +747,16 @@ final class CallMethodMultiRule extends CallMethodRule { this.multiParamIndex = multiParamIndex; } - public void end() throws Exception { + /** + * Process the end of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise + */ + public void end(String namespace, String name) throws Exception { // Retrieve or construct the parameter values array Object parameters[] = null; @@ -859,8 +868,18 @@ final class SoapHeaderRule extends Rule { public SoapHeaderRule() { } - public void body(String text) - throws Exception { + /** + * Process the body text of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise + * @param bodyText The body text of this element + */ + public void body(String namespace, String name, String text) + throws Exception { String namespaceuri = null; String localpart = text; int colon = text.indexOf(':'); @@ -883,8 +902,18 @@ final class ServiceQnameRule extends Rule { public ServiceQnameRule() { } - public void body(String text) - throws Exception { + /** + * Process the body text of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise + * @param bodyText The body text of this element + */ + public void body(String namespace, String name, String text) + throws Exception { String namespaceuri = null; String localpart = text; int colon = text.indexOf(':'); 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..c3cef34e6 100644 --- a/java/org/apache/tomcat/util/digester/CallMethodRule.java +++ b/java/org/apache/tomcat/util/digester/CallMethodRule.java @@ -69,74 +69,6 @@ public class CallMethodRule extends Rule { // ----------------------------------------------------------- Constructors - - /** - * 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. @@ -434,9 +366,15 @@ public class CallMethodRule extends Rule { /** * Process the start of this element. * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise * @param attributes The attribute list for this element */ - public void begin(Attributes attributes) throws Exception { + public void begin(String namespace, String name, Attributes attributes) + throws Exception { // Push an array to capture the parameter values if necessary if (paramCount > 0) { @@ -453,9 +391,15 @@ public class CallMethodRule extends Rule { /** * Process the body text of this element. * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise * @param bodyText The body text of this element */ - public void body(String bodyText) throws Exception { + public void body(String namespace, String name, String bodyText) + throws Exception { if (paramCount == 0) { this.bodyText = bodyText.trim(); @@ -466,8 +410,14 @@ public class CallMethodRule extends Rule { /** * Process the end of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise */ - public void end() throws Exception { + public void end(String namespace, String name) throws Exception { // Retrieve or construct the parameter values array Object parameters[] = null; diff --git a/java/org/apache/tomcat/util/digester/CallParamRule.java b/java/org/apache/tomcat/util/digester/CallParamRule.java index 7f804610d..6d10e394f 100644 --- a/java/org/apache/tomcat/util/digester/CallParamRule.java +++ b/java/org/apache/tomcat/util/digester/CallParamRule.java @@ -45,42 +45,6 @@ public class CallParamRule extends Rule { // ----------------------------------------------------------- Constructors - - /** - * 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. @@ -175,9 +139,15 @@ public class CallParamRule extends Rule { /** * Process the start of this element. * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise * @param attributes The attribute list for this element */ - public void begin(Attributes attributes) throws Exception { + public void begin(String namespace, String name, Attributes attributes) + throws Exception { Object param = null; @@ -215,9 +185,15 @@ public class CallParamRule extends Rule { /** * Process the body text of this element. * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise * @param bodyText The body text of this element */ - public void body(String bodyText) throws Exception { + public void body(String namespace, String name, String bodyText) + throws Exception { if (attributeName == null && !fromStack) { // We must wait to set the parameter until end diff --git a/java/org/apache/tomcat/util/digester/Digester.java b/java/org/apache/tomcat/util/digester/Digester.java index 6e88381ee..6c7b4e4fd 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. @@ -1588,33 +1531,6 @@ public class Digester extends DefaultHandler { // ------------------------------------------------------- Public Methods - - /** - * 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 +2608,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/NodeCreateRule.java b/java/org/apache/tomcat/util/digester/NodeCreateRule.java index 7f7f6822f..293a51ea2 100644 --- a/java/org/apache/tomcat/util/digester/NodeCreateRule.java +++ b/java/org/apache/tomcat/util/digester/NodeCreateRule.java @@ -418,8 +418,14 @@ public class NodeCreateRule extends Rule { /** * Pop the Node off the top of the stack. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise */ - public void end() throws Exception { + public void end(String namespace, String name) throws Exception { Object top = digester.pop(); diff --git a/java/org/apache/tomcat/util/digester/ObjectCreateRule.java b/java/org/apache/tomcat/util/digester/ObjectCreateRule.java index d1c4fe40f..2cf0120a4 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) { @@ -184,9 +112,15 @@ public class ObjectCreateRule extends Rule { /** * Process the beginning of this element. * - * @param attributes The attribute list of this element + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise + * @param attributes The attribute list for this element */ - public void begin(Attributes attributes) throws Exception { + public void begin(String namespace, String name, Attributes attributes) + throws Exception { // Identify the name of the class to instantiate String realClassName = className; @@ -211,8 +145,14 @@ public class ObjectCreateRule extends Rule { /** * Process the end of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise */ - public void end() throws Exception { + public void end(String namespace, String name) throws Exception { Object top = digester.pop(); if (digester.log.isDebugEnabled()) { diff --git a/java/org/apache/tomcat/util/digester/Rule.java b/java/org/apache/tomcat/util/digester/Rule.java index c20239cd0..8583e67ac 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.

*/ 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/SetNextRule.java b/java/org/apache/tomcat/util/digester/SetNextRule.java index 54063003f..6eae24b08 100644 --- a/java/org/apache/tomcat/util/digester/SetNextRule.java +++ b/java/org/apache/tomcat/util/digester/SetNextRule.java @@ -171,8 +171,14 @@ public class SetNextRule extends Rule { /** * Process the end of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise */ - public void end() throws Exception { + public void end(String namespace, String name) throws Exception { // Identify the objects to be used Object child = digester.peek(0); diff --git a/java/org/apache/tomcat/util/digester/SetPropertiesRule.java b/java/org/apache/tomcat/util/digester/SetPropertiesRule.java index e68bbf1d2..63d35cf85 100644 --- a/java/org/apache/tomcat/util/digester/SetPropertiesRule.java +++ b/java/org/apache/tomcat/util/digester/SetPropertiesRule.java @@ -150,9 +150,15 @@ public class SetPropertiesRule extends Rule { /** * Process the beginning of this element. * - * @param attributes The attribute list of this element + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise + * @param attributes The attribute list for this element */ - public void begin(Attributes attributes) throws Exception { + public void begin(String namespace, String theName, Attributes attributes) + throws Exception { // Populate the corresponding properties of the top object Object top = digester.peek(); diff --git a/java/org/apache/tomcat/util/digester/SetPropertyRule.java b/java/org/apache/tomcat/util/digester/SetPropertyRule.java index f4b133ed7..a5c7d4074 100644 --- a/java/org/apache/tomcat/util/digester/SetPropertyRule.java +++ b/java/org/apache/tomcat/util/digester/SetPropertyRule.java @@ -91,12 +91,18 @@ public class SetPropertyRule extends Rule { /** * Process the beginning of this element. * - * @param attributes The attribute list of this element - * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise + * @param attributes The attribute list for this element + * * @exception NoSuchMethodException if the bean does not * have a writeable property of the specified name */ - public void begin(Attributes attributes) throws Exception { + public void begin(String namespace, String theName, Attributes attributes) + throws Exception { // Identify the actual property name and value to be used String actualName = null; diff --git a/java/org/apache/tomcat/util/digester/SetRootRule.java b/java/org/apache/tomcat/util/digester/SetRootRule.java index b801c5052..ee25f235b 100644 --- a/java/org/apache/tomcat/util/digester/SetRootRule.java +++ b/java/org/apache/tomcat/util/digester/SetRootRule.java @@ -172,8 +172,14 @@ public class SetRootRule extends Rule { /** * Process the end of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise */ - public void end() throws Exception { + public void end(String namespace, String name) throws Exception { // Identify the objects to be used Object child = digester.peek(0); diff --git a/java/org/apache/tomcat/util/digester/SetTopRule.java b/java/org/apache/tomcat/util/digester/SetTopRule.java index 08500cda3..1fc09d50c 100644 --- a/java/org/apache/tomcat/util/digester/SetTopRule.java +++ b/java/org/apache/tomcat/util/digester/SetTopRule.java @@ -171,8 +171,14 @@ public class SetTopRule extends Rule { /** * Process the end of this element. + * + * @param namespace the namespace URI of the matching element, or an + * empty string if the parser is not namespace aware or the element has + * no namespace + * @param name the local name if the parser is namespace aware, or just + * the element name otherwise */ - public void end() throws Exception { + public void end(String namespace, String name) throws Exception { // Identify the objects to be used Object child = digester.peek(0); diff --git a/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java b/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java index 847597f96..12bc64491 100644 --- a/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java +++ b/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java @@ -107,10 +107,6 @@ public class WithDefaultsRulesWrapper implements Rules { // --------------------------------------------------------- Public Methods - public List match(String pattern) { - return match("", pattern); - } - /** * Return list of rules matching given pattern. * If wrapped implementation returns any matches return those. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 40f15a945..f835388d2 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -169,7 +169,13 @@ Numerous code clean-up changes including the use of generics and - removing unused imports, fields, parameters and methods. + removing unused imports, fields, parameters and methods. (markt) + + + All deprecated internal code has been removed. Warning: If you + have custom components for a previous Tomcat version that extend + internal Tomcat classes and override deprecated methods it is highly + likely that they will no longer work. (markt) Parameterize version number throughout build scripts and source. (rjung) -- 2.11.0