tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1049654 - in /tomcat/trunk: java/org/apache/catalina/startup/Catalina.java java/org/apache/tomcat/util/digester/Digester.java java/org/apache/tomcat/util/digester/ObjectCreateRule.java webapps/docs/changelog.xml
Date Wed, 15 Dec 2010 22:40:10 GMT
On 15/12/2010 19:19, Christopher Schultz wrote:
> Mark,
> 
> Does this patch actually change anything?

Yes, it fixes the associated bug report.

> It looks like you've created a
> new catch block that does exactly what the existing one would have done.

The new code is not the same. I'll leave exactly what the difference is
as an exercise for the reader.

Mark

> 
> -chris
> 
> On 12/15/2010 12:58 PM, markt@apache.org wrote:
>> Author: markt
>> Date: Wed Dec 15 17:58:05 2010
>> New Revision: 1049654
>>
>> URL: http://svn.apache.org/viewvc?rev=1049654&view=rev
>> Log:
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=10972
>> Improve error message if the className attribute is missing on an element in server.xml
where it is required.
>>
>> Modified:
>>     tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
>>     tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java
>>     tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java
>>     tomcat/trunk/webapps/docs/changelog.xml
>>
>> Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
>> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1049654&r1=1049653&r2=1049654&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original)
>> +++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Wed Dec 15 17:58:05
2010
>> @@ -45,6 +45,7 @@ import org.apache.tomcat.util.log.System
>>  import org.apache.tomcat.util.res.StringManager;
>>  import org.xml.sax.Attributes;
>>  import org.xml.sax.InputSource;
>> +import org.xml.sax.SAXParseException;
>>  
>>  
>>  /**
>> @@ -532,9 +533,12 @@ public class Catalina {
>>              digester.push(this);
>>              digester.parse(inputSource);
>>              inputStream.close();
>> +        } catch (SAXParseException spe) {
>> +            log.warn("Catalina.start using " + getConfigFile() + ": " +
>> +                    spe.getMessage());
>> +            return;
>>          } catch (Exception e) {
>> -            log.warn("Catalina.start using "
>> -                               + getConfigFile() + ": " , e);
>> +            log.warn("Catalina.start using " + getConfigFile() + ": " , e);
>>              return;
>>          }
>>  
>>
>> 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=1049654&r1=1049653&r2=1049654&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java (original)
>> +++ tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Wed Dec 15 17:58:05
2010
>> @@ -2682,7 +2682,7 @@ public class Digester extends DefaultHan
>>          }
>>          if (locator != null) {
>>              String error = "Error at (" + locator.getLineNumber() + ", " +
>> -                    locator.getColumnNumber() + ": " + message;
>> +                    locator.getColumnNumber() + ") : " + message;
>>              if (e != null) {
>>                  return new SAXParseException(error, locator, e);
>>              } else {
>>
>> 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=1049654&r1=1049653&r2=1049654&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java (original)
>> +++ tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java Wed Dec
15 17:58:05 2010
>> @@ -136,11 +136,15 @@ public class ObjectCreateRule extends Ru
>>                      "}New " + realClassName);
>>          }
>>  
>> +        if (realClassName == null) {
>> +            throw new NullPointerException("No class name specified for " +
>> +                    namespace + " " + name);
>> +        }
>> +
>>          // Instantiate the new object and push it on the context stack
>>          Class<?> clazz = digester.getClassLoader().loadClass(realClassName);
>>          Object instance = clazz.newInstance();
>>          digester.push(instance);
>> -
>>      }
>>  
>>  
>>
>> Modified: tomcat/trunk/webapps/docs/changelog.xml
>> URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1049654&r1=1049653&r2=1049654&view=diff
>> ==============================================================================
>> --- tomcat/trunk/webapps/docs/changelog.xml (original)
>> +++ tomcat/trunk/webapps/docs/changelog.xml Wed Dec 15 17:58:05 2010
>> @@ -54,6 +54,10 @@
>>          performance benefits. (markt)
>>        </add>
>>        <update>
>> +        <bug>10972</bug>: Improve error message if the className attribute
is
>> +        missing on an element in server.xml where it is required. (markt)
>> +      </update>
>> +      <update>
>>          <bug>48692</bug>: Provide option to parse
>>          <code>application/x-www-form-urlencoded</code> PUT requests.
(schultz)
>>        </update>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message