You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/12/31 12:38:31 UTC

svn commit: r1226069 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Author: markt
Date: Sat Dec 31 11:38:30 2011
New Revision: 1226069

URL: http://svn.apache.org/viewvc?rev=1226069&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52387
Silence logging for correct host
Patch provided by David Calavera

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1226069&r1=1226068&r2=1226069&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Sat Dec 31 11:38:30 2011
@@ -494,7 +494,7 @@ public class Tomcat {
 
     public Context addContext(Host host, String contextPath, String contextName,
             String dir) {
-        silence(contextPath);
+        silence(host, contextPath);
         Context ctx = new StandardContext();
         ctx.setName(contextName);
         ctx.setPath(contextPath);
@@ -514,7 +514,7 @@ public class Tomcat {
     }
 
     public Context addWebapp(Host host, String url, String name, String path) {
-        silence(url);
+        silence(host, url);
 
         Context ctx = new StandardContext();
         ctx.setName(name);
@@ -666,9 +666,9 @@ public class Tomcat {
         }
     }
 
-    private void silence(String ctx) {
+    private void silence(Host host, String ctx) {
         String base = "org.apache.catalina.core.ContainerBase.[default].[";
-        base += getHost().getName();
+        base += host.getName();
         base += "].[";
         base += ctx;
         base += "]";



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


Re: svn commit: r1226069 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Posted by Mark Thomas <ma...@apache.org>.
On 31/12/2011 18:42, Konstantin Kolinko wrote:
> This commit broke the buildbot and I can reproduce the failures.

Doh. Fixed.

Mark

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


Re: svn commit: r1226069 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Posted by Konstantin Kolinko <kn...@gmail.com>.
This commit broke the buildbot and I can reproduce the failures.

E.g.
TEST-javax.el.TestCompositeELResolver.BIO.txt
[[[
java.lang.NullPointerException
	at org.apache.catalina.startup.Tomcat.silence(Tomcat.java:671)
	at org.apache.catalina.startup.Tomcat.addWebapp(Tomcat.java:517)
	at org.apache.catalina.startup.Tomcat.addWebapp(Tomcat.java:513)
	at javax.el.TestCompositeELResolver.testBug50408(TestCompositeELResolver.java:40)
]]]

Line 671 is
        base += host.getName();



2011/12/31  <ma...@apache.org>:
> Author: markt
> Date: Sat Dec 31 11:38:30 2011
> New Revision: 1226069
>
> URL: http://svn.apache.org/viewvc?rev=1226069&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52387
> Silence logging for correct host
> Patch provided by David Calavera
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
>
> Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1226069&r1=1226068&r2=1226069&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Sat Dec 31 11:38:30 2011
> @@ -494,7 +494,7 @@ public class Tomcat {
>
>     public Context addContext(Host host, String contextPath, String contextName,
>             String dir) {
> -        silence(contextPath);
> +        silence(host, contextPath);
>         Context ctx = new StandardContext();
>         ctx.setName(contextName);
>         ctx.setPath(contextPath);
> @@ -514,7 +514,7 @@ public class Tomcat {
>     }
>
>     public Context addWebapp(Host host, String url, String name, String path) {
> -        silence(url);
> +        silence(host, url);
>
>         Context ctx = new StandardContext();
>         ctx.setName(name);
> @@ -666,9 +666,9 @@ public class Tomcat {
>         }
>     }
>
> -    private void silence(String ctx) {
> +    private void silence(Host host, String ctx) {
>         String base = "org.apache.catalina.core.ContainerBase.[default].[";
> -        base += getHost().getName();
> +        base += host.getName();
>         base += "].[";
>         base += ctx;
>         base += "]";
>
>
>
> ---------------------------------------------------------------------
> 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