Author: markt Date: Thu Nov 20 00:19:23 2008 New Revision: 719194 URL: http://svn.apache.org/viewvc?rev=719194&view=rev Log: Revert r718819 that completely broke Tomcat.
Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java tomcat/trunk/java/org/apache/tomcat/util/digester/CallMethodRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/Rule.java tomcat/trunk/java/org/apache/tomcat/util/digester/Rules.java tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetNextRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetRootRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetTopRule.java tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.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/MbeansSource.java tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Nov 20 00:19:23 2008 @@ -626,7 +626,7 @@ } if (conv != null) { try { - conv.convert(bc, cc, cc.getBuffer().length - cc.getEnd()); + conv.convert(bc, cc); uri.setChars(cc.getBuffer(), cc.getStart(), cc.getLength()); return; Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Thu Nov 20 00:19:23 2008 @@ -470,9 +470,25 @@ /** * 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<Object,Object> staticProp, PropertySource dynamicProp[]) { + public static String replaceProperties(String value, Hashtable staticProp, + PropertySource dynamicProp[]) { if (value.indexOf("$") < 0) { return value; } Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Thu Nov 20 00:19:23 2008 @@ -67,6 +67,16 @@ 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 Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java Thu Nov 20 00:19:23 2008 @@ -68,10 +68,10 @@ /** * Creates a new, uninitialized MessageBytes object. - * Use static newInstance() in order to allow + * @deprecated Use static newInstance() in order to allow * future hooks. */ - private MessageBytes() { + public MessageBytes() { } /** Construct a new MessageBytes instance Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java Thu Nov 20 00:19:23 2008 @@ -132,6 +132,22 @@ * in the order originally registered through the <code>add()</code> * method. * + * @param pattern Nesting pattern to be matched + * + * @deprecated Call match(namespaceURI,pattern) instead. + */ + public List<Rule> 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 <strong>must</strong> be returned + * in the order originally registered through the <code>add()</code> + * method. + * * @param namespaceURI Namespace URI for which to select matching rules, * or <code>null</code> to match regardless of namespace URI * @param pattern Nesting pattern to be matched Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/CallMethodRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/CallMethodRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/CallMethodRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/CallMethodRule.java Thu Nov 20 00:19:23 2008 @@ -74,6 +74,73 @@ * 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 <code>java.lang.Boolean</code> + * for a <code>boolean</code> parameter) + * + * @deprecated The digester instance is now set in the [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 <code>java.lang.Boolean.TYPE</code> + * for a <code>boolean</code> parameter) + * + * @deprecated The digester instance is now set in the [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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. Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java Thu Nov 20 00:19:23 2008 @@ -50,6 +50,41 @@ * 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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) { Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Thu Nov 20 00:19:23 2008 @@ -206,6 +206,13 @@ protected SAXParserFactory factory = null; /** + * @deprecated This is now managed by [EMAIL PROTECTED] ParserFeatureSetterFactory} + */ + protected String JAXP_SCHEMA_LANGUAGE = + "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; + + + /** * The Locator associated with our parser. */ protected Locator locator = null; @@ -436,6 +443,37 @@ /** + * 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() { @@ -726,6 +764,25 @@ /** + * 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 <code>Rules</code> implementation object containing our * rules collection and associated matching policy. If none has been * established, a default implementation will be created and returned. @@ -1533,6 +1590,32 @@ /** + * 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). * @@ -2609,6 +2692,26 @@ /** + * 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 <code>match()</code> on the <code>Rules</code> + * implementation returned by <code>getRules()</code> + */ + List<Rule> getRules(String match) { + + return (getRules().match(match)); + + } + + + /** * <p>Return the top object on the parameters stack without removing it. If there are * no objects on the stack, return <code>null</code>.</p> * Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java Thu Nov 20 00:19:23 2008 @@ -46,6 +46,103 @@ /** + * Construct a factory create rule that will use the specified + * class name to create an [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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, + * [EMAIL PROTECTED] ObjectCreationFactory}. + * + * @param digester The associated Digester + * @param creationFactory called on to create the object. + * + * @deprecated The digester instance is now set in the [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #FactoryCreateRule(ObjectCreationFactory creationFactory)} instead. + */ + public FactoryCreateRule(Digester digester, + ObjectCreationFactory creationFactory) { + + this(creationFactory); + + } + + /** * <p>Construct a factory create rule that will use the specified * class name to create an [EMAIL PROTECTED] ObjectCreationFactory} which will * then be used to create an object and push it on the stack.</p> Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java Thu Nov 20 00:19:23 2008 @@ -38,6 +38,78 @@ /** * 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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) { Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Rule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/Rule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/Rule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/Rule.java Thu Nov 20 00:19:23 2008 @@ -35,6 +35,19 @@ /** + * Constructor sets the associated Digester. + * + * @param digester The digester with which this rule is associated + * @deprecated The digester instance is now set in the [EMAIL PROTECTED] Digester#addRule} method. Use [EMAIL PROTECTED] #Rule()} instead. + */ + public Rule(Digester digester) { + + super(); + setDigester(digester); + + } + + /** * <p>Base constructor. * Now the digester will be set when the rule is added.</p> */ @@ -105,6 +118,22 @@ /** * 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 [EMAIL PROTECTED] #begin(String,String,Attributes) begin} + * method with <code>namespace</code> and <code>name</code> + * 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 [EMAIL PROTECTED] #begin(Attributes) begin} without the * <code>namespace</code> and <code>name</code> parameters, to retain @@ -121,7 +150,24 @@ public void begin(String namespace, String name, Attributes attributes) throws Exception { - // The default implementation does nothing + 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 [EMAIL PROTECTED] #body(String,String,String) body} method + * with <code>namespace</code> and <code>name</code> parameters + * instead. + */ + public void body(String text) throws Exception { + + ; // The default implementation does nothing } @@ -144,7 +190,21 @@ public void body(String namespace, String name, String text) throws Exception { - // The default implementation does nothing + body(text); + + } + + + /** + * This method is called when the end of a matching XML element + * is encountered. + * + * @deprecated Use the [EMAIL PROTECTED] #end(String,String) end} method with + * <code>namespace</code> and <code>name</code> parameters instead. + */ + public void end() throws Exception { + + ; // The default implementation does nothing } @@ -166,7 +226,7 @@ public void end(String namespace, String name) throws Exception { - // The default implementation does nothing + end(); } Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Rules.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/Rules.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/Rules.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/Rules.java Thu Nov 20 00:19:23 2008 @@ -94,6 +94,20 @@ * in the order originally registered through the <code>add()</code> * method. * + * @param pattern Nesting pattern to be matched + * + * @deprecated Call match(namespaceURI,pattern) instead. + */ + public List<Rule> 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 <strong>must</strong> be returned + * in the order originally registered through the <code>add()</code> + * method. + * * @param namespaceURI Namespace URI for which to select matching rules, * or <code>null</code> to match regardless of namespace URI * @param pattern Nesting pattern to be matched Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java Thu Nov 20 00:19:23 2008 @@ -188,6 +188,24 @@ * in the order originally registered through the <code>add()</code> * method. * + * @param pattern Nesting pattern to be matched + * + * @deprecated Call match(namespaceURI,pattern) instead. + */ + public List<Rule> 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 <strong>must</strong> be returned + * in the order originally registered through the <code>add()</code> + * method. + * * @param namespaceURI Namespace URI for which to select matching rules, * or <code>null</code> to match regardless of namespace URI * @param pattern Nesting pattern to be matched Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/SetNextRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/SetNextRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/SetNextRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/SetNextRule.java Thu Nov 20 00:19:23 2008 @@ -44,6 +44,44 @@ * 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 <code>java.lang.Boolean</code> + * for a <code>boolean</code> parameter) + * + * @deprecated The digester instance is now set in the [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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) { Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java Thu Nov 20 00:19:23 2008 @@ -42,6 +42,21 @@ /** + * 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #SetPropertiesRule()} instead. + */ + public SetPropertiesRule(Digester digester) { + + this(); + + } + + + /** * Base constructor. */ public SetPropertiesRule() { Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java Thu Nov 20 00:19:23 2008 @@ -39,6 +39,25 @@ * 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/SetRootRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/SetRootRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/SetRootRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/SetRootRule.java Thu Nov 20 00:19:23 2008 @@ -44,6 +44,44 @@ * 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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 <code>java.lang.Boolean</code> + * for a <code>boolean</code> parameter) + * + * @deprecated The digester instance is now set in the [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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) { Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/SetTopRule.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/SetTopRule.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/digester/SetTopRule.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/SetTopRule.java Thu Nov 20 00:19:23 2008 @@ -44,6 +44,44 @@ * "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 [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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 <code>java.lang.Boolean</code> + * for a <code>boolean</code> parameter) + * + * @deprecated The digester instance is now set in the [EMAIL PROTECTED] Digester#addRule} method. + * Use [EMAIL PROTECTED] #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) { Modified: tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java Thu Nov 20 00:19:23 2008 @@ -211,6 +211,26 @@ 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 @@ -324,6 +344,21 @@ 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)=='\"'); Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java Thu Nov 20 00:19:23 2008 @@ -224,7 +224,7 @@ private synchronized void registerNotifications( FixedNotificationFilter filter ) { String names[]=filter.getNames(); - Registry reg=Registry.getRegistry(null, null); + Registry reg=Registry.getRegistry(); for( int i=0; i<names.length; i++ ) { int code=reg.getId(null, names[i]); if( hooks.length < code ) { 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=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java Thu Nov 20 00:19:23 2008 @@ -453,6 +453,57 @@ descriptorsByClass.remove( bean.getType()); } + // -------------------- Deprecated 1.0 methods -------------------- + + /** + * Factory method to create (if necessary) and return our + * <code>MBeanServer</code> instance. + * + * @since 1.0 + * @deprecated Use the instance method + */ + public static MBeanServer getServer() { + return Registry.getRegistry().getMBeanServer(); + } + + /** + * Set the <code>MBeanServer</code> to be utilized for our + * registered management beans. + * + * @param mbeanServer The new <code>MBeanServer</code> 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. @@ -795,13 +846,15 @@ return; } - /** + /**Experimental. Will become private, some code may still use it + * * @param sourceType * @param source * @param param * @throws Exception + * @deprecated */ - private void loadDescriptors(String sourceType, Object source, String param) + public void loadDescriptors(String sourceType, Object source, String param) throws Exception { load(sourceType, source, param); } @@ -907,7 +960,6 @@ public void resetMetadata() { stop(); } - /** * Load the registry from the XML input found in the specified input * stream. @@ -922,6 +974,22 @@ 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 { @@ -934,4 +1002,19 @@ } } + + /** + * 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 ); + } } Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java Thu Nov 20 00:19:23 2008 @@ -80,7 +80,7 @@ } public void execute() throws Exception { - if( registry==null ) registry=Registry.getRegistry(null, null); + if( registry==null ) registry=Registry.getRegistry(); try { InputStream stream=(InputStream)source; 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=719194&r1=719193&r2=719194&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 Thu Nov 20 00:19:23 2008 @@ -77,7 +77,7 @@ } public void execute() throws Exception { - if( registry==null ) registry=Registry.getRegistry(null, null); + if( registry==null ) registry=Registry.getRegistry(); try { ManagedBean managed = createManagedBean(registry, null, (Class<?>)source, type); 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=719194&r1=719193&r2=719194&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 Thu Nov 20 00:19:23 2008 @@ -70,7 +70,7 @@ } public void execute() throws Exception { - if( registry==null ) registry=Registry.getRegistry(null, null); + if( registry==null ) registry=Registry.getRegistry(); long t1=System.currentTimeMillis(); try { InputStream stream=null; Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java Thu Nov 20 00:19:23 2008 @@ -123,7 +123,7 @@ public void init() throws Exception { if( mbeans==null) execute(); - if( registry==null ) registry=Registry.getRegistry(null, null); + if( registry==null ) registry=Registry.getRegistry(); registry.invoke(mbeans, "init", false); } @@ -137,7 +137,7 @@ } public void execute() throws Exception { - if( registry==null ) registry=Registry.getRegistry(null, null); + if( registry==null ) registry=Registry.getRegistry(); try { InputStream stream=getInputStream(); long t1=System.currentTimeMillis(); @@ -160,8 +160,7 @@ firstMbeanN=descriptorsN; } - MBeanServer server = - Registry.getRegistry(null, null).getMBeanServer(); + MBeanServer server = Registry.getServer(); // XXX Not very clean... Just a workaround if( ! loaderLoaded ) { Modified: tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java Thu Nov 20 00:19:23 2008 @@ -28,6 +28,22 @@ */ 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. * Modified: tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java?rev=719194&r1=719193&r2=719194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java Thu Nov 20 00:19:23 2008 @@ -525,6 +525,12 @@ currentThreadCount = toOpen; } + /** @deprecated */ + void log( String s ) { + log.info(s); + //loghelper.flush(); + } + /** * Periodically execute an action - cleanup in this case */ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]