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 2012/01/29 20:31:42 UTC

svn commit: r1237428 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Author: markt
Date: Sun Jan 29 19:31:42 2012
New Revision: 1237428

URL: http://svn.apache.org/viewvc?rev=1237428&view=rev
Log:
Remove deprecated code

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

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1237428&r1=1237427&r2=1237428&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Sun Jan 29 19:31:42 2012
@@ -162,14 +162,6 @@ public class ContextConfig implements Li
 
 
     /**
-     * The default web application's context file location.
-     * @deprecated Unnecessary
-     */
-    @Deprecated
-    protected String defaultContextXml = null;
-
-
-    /**
      * The default web application's deployment descriptor location.
      */
     protected String defaultWebXml = null;
@@ -486,12 +478,14 @@ public class ContextConfig implements Li
      */
     protected void contextConfig(Digester digester) {
 
+        String defaultContextXml = null;
+
         // Open the default context.xml file, if it exists
-        if( defaultContextXml==null && context instanceof StandardContext ) {
+        if (context instanceof StandardContext) {
             defaultContextXml = ((StandardContext)context).getDefaultContextXml();
         }
         // set the default if we don't have any overrides
-        if( defaultContextXml==null ) {
+        if (defaultContextXml == null) {
             defaultContextXml = Constants.DefaultContextXml;
         }
 



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


Re: svn commit: r1237428 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Posted by Mark Thomas <ma...@apache.org>.
On 29/01/2012 20:53, Konstantin Kolinko wrote:
> 2012/1/29  <ma...@apache.org>:
>> Author: markt
>> Date: Sun Jan 29 19:31:42 2012
>> New Revision: 1237428
>>
>> URL: http://svn.apache.org/viewvc?rev=1237428&view=rev
>> Log:
>> Remove deprecated code
>>
>> Modified:
>>    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
>>
> 
> 1. The mbeans-descriptors.xml file there still lists the
> "defaultContextXml" property that you removed. [1]

Thanks, I'll fix that.

> 2. Overall this feels like removing a feature.
> I woudn't veto as I never used it and I do not have strong evidence,
> but I am -0.

There isn't going to be a 8.0.x release for a while. Anyone affected by
this will see the deprecation markers and complain if it is a problem.
If that happens, I'll be happy to restore the code.

Mark

> 
> I think it might have the same use as ContextConfig#defaultWebXml
> (used by tests and by embedding code). Something like specifying
> different defaults file for embedded use.
> 
> Neither "defaultContextXml" nor "defaultWebXml" are documented in
> config/context.html.
> 
> 
> [1] http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/mbeans-descriptors.xml?view=markup
> 
> 
> Best regards,
> Konstantin Kolinko
> 
> 
> 
> 
>>
>> Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
>> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1237428&r1=1237427&r2=1237428&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
>> +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Sun Jan 29 19:31:42 2012
>> @@ -162,14 +162,6 @@ public class ContextConfig implements Li
>>
>>
>>     /**
>> -     * The default web application's context file location.
>> -     * @deprecated Unnecessary
>> -     */
>> -    @Deprecated
>> -    protected String defaultContextXml = null;
>> -
>> -
>> -    /**
>>      * The default web application's deployment descriptor location.
>>      */
>>     protected String defaultWebXml = null;
>> @@ -486,12 +478,14 @@ public class ContextConfig implements Li
>>      */
>>     protected void contextConfig(Digester digester) {
>>
>> +        String defaultContextXml = null;
>> +
>>         // Open the default context.xml file, if it exists
>> -        if( defaultContextXml==null && context instanceof StandardContext ) {
>> +        if (context instanceof StandardContext) {
>>             defaultContextXml = ((StandardContext)context).getDefaultContextXml();
>>         }
>>         // set the default if we don't have any overrides
>> -        if( defaultContextXml==null ) {
>> +        if (defaultContextXml == null) {
>>             defaultContextXml = Constants.DefaultContextXml;
>>         }
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 


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


Re: svn commit: r1237428 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/1/29  <ma...@apache.org>:
> Author: markt
> Date: Sun Jan 29 19:31:42 2012
> New Revision: 1237428
>
> URL: http://svn.apache.org/viewvc?rev=1237428&view=rev
> Log:
> Remove deprecated code
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
>

1. The mbeans-descriptors.xml file there still lists the
"defaultContextXml" property that you removed. [1]

2. Overall this feels like removing a feature.
I woudn't veto as I never used it and I do not have strong evidence,
but I am -0.

I think it might have the same use as ContextConfig#defaultWebXml
(used by tests and by embedding code). Something like specifying
different defaults file for embedded use.

Neither "defaultContextXml" nor "defaultWebXml" are documented in
config/context.html.


[1] http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/mbeans-descriptors.xml?view=markup


Best regards,
Konstantin Kolinko




>
> Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1237428&r1=1237427&r2=1237428&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Sun Jan 29 19:31:42 2012
> @@ -162,14 +162,6 @@ public class ContextConfig implements Li
>
>
>     /**
> -     * The default web application's context file location.
> -     * @deprecated Unnecessary
> -     */
> -    @Deprecated
> -    protected String defaultContextXml = null;
> -
> -
> -    /**
>      * The default web application's deployment descriptor location.
>      */
>     protected String defaultWebXml = null;
> @@ -486,12 +478,14 @@ public class ContextConfig implements Li
>      */
>     protected void contextConfig(Digester digester) {
>
> +        String defaultContextXml = null;
> +
>         // Open the default context.xml file, if it exists
> -        if( defaultContextXml==null && context instanceof StandardContext ) {
> +        if (context instanceof StandardContext) {
>             defaultContextXml = ((StandardContext)context).getDefaultContextXml();
>         }
>         // set the default if we don't have any overrides
> -        if( defaultContextXml==null ) {
> +        if (defaultContextXml == null) {
>             defaultContextXml = Constants.DefaultContextXml;
>         }
>
>
>
>
> ---------------------------------------------------------------------
> 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