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 2016/05/20 11:04:47 UTC

svn commit: r1744705 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/loader/ test/org/apache/catalina/loader/ webapps/docs/config/

Author: markt
Date: Fri May 20 11:04:47 2016
New Revision: 1744705

URL: http://svn.apache.org/viewvc?rev=1744705&view=rev
Log:
Deprecate clearReferencesStatic

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
    tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml
    tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java
    tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java
    tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1744705&r1=1744704&r2=1744705&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri May 20 11:04:47 2016
@@ -720,7 +720,10 @@ public class StandardContext extends Con
      * without memory leaks using recent JVMs should operate correctly with this
      * option set to <code>false</code>. If not specified, the default value of
      * <code>false</code> will be used.
+     *
+     * @deprecated This option will be removed in Tomcat 8.5
      */
+    @Deprecated
     private boolean clearReferencesStatic = false;
 
     /**
@@ -2591,7 +2594,10 @@ public class StandardContext extends Con
 
     /**
      * @return the clearReferencesStatic flag for this Context.
+     *
+     * @deprecated This option will be removed in Tomcat 8.5
      */
+    @Deprecated
     public boolean getClearReferencesStatic() {
 
         return (this.clearReferencesStatic);
@@ -2603,7 +2609,10 @@ public class StandardContext extends Con
      * Set the clearReferencesStatic feature for this Context.
      *
      * @param clearReferencesStatic The new flag value
+     *
+     * @deprecated This option will be removed in Tomcat 8.5
      */
+    @Deprecated
     public void setClearReferencesStatic(boolean clearReferencesStatic) {
 
         boolean oldClearReferencesStatic = this.clearReferencesStatic;

Modified: tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml?rev=1744705&r1=1744704&r2=1744705&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml (original)
+++ tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml Fri May 20 11:04:47 2016
@@ -87,7 +87,7 @@
                type="boolean"/>
 
     <attribute name="clearReferencesStatic"
-               description="Should Tomcat attempt to null out any static or final fields from loaded classes when a web application is stopped as a work around for apparent garbage collection bugs and application coding errors?"
+               description="Deprecated. Will be removed in Tomcat 8.5. Should Tomcat attempt to null out any static or final fields from loaded classes when a web application is stopped as a work around for apparent garbage collection bugs and application coding errors?"
                type="boolean"/>
 
     <attribute name="clearReferencesStopThreads"

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java?rev=1744705&r1=1744704&r2=1744705&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java Fri May 20 11:04:47 2016
@@ -343,7 +343,10 @@ public abstract class WebappClassLoaderB
      * without memory leaks using recent JVMs should operate correctly with this
      * option set to <code>false</code>. If not specified, the default value of
      * <code>false</code> will be used.
+     *
+     * @deprecated This option will be removed in Tomcat 8.5
      */
+    @Deprecated
     private boolean clearReferencesStatic = false;
 
     /**
@@ -543,7 +546,10 @@ public abstract class WebappClassLoaderB
      * Return the clearReferencesStatic flag for this Context.
      * @return <code>true</code> if the classloader should attempt to set to null
      *    static final fields in loaded classes
+     *
+     * @deprecated This option will be removed in Tomcat 8.5
      */
+    @Deprecated
     public boolean getClearReferencesStatic() {
         return (this.clearReferencesStatic);
     }
@@ -553,7 +559,10 @@ public abstract class WebappClassLoaderB
      * Set the clearReferencesStatic feature for this Context.
      *
      * @param clearReferencesStatic The new flag value
+     *
+     * @deprecated This option will be removed in Tomcat 8.5
      */
+    @Deprecated
     public void setClearReferencesStatic(boolean clearReferencesStatic) {
         this.clearReferencesStatic = clearReferencesStatic;
     }

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java?rev=1744705&r1=1744704&r2=1744705&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java Fri May 20 11:04:47 2016
@@ -239,6 +239,7 @@ public class TestWebappClassLoaderWeavin
 
     }
 
+    @SuppressWarnings("deprecation")
     @Test
     public void testCopiedClassLoaderExcludesResourcesAndTransformers() throws Exception {
 

Modified: tomcat/trunk/webapps/docs/config/context.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1744705&r1=1744704&r2=1744705&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Fri May 20 11:04:47 2016
@@ -707,6 +707,8 @@
         JVMs should operate correctly with this attribute set to
         <code>false</code>. If not specified, the default value of
         <code>false</code> will be used.</p>
+        <p>This attribute has been deprecated and will be removed in Tomcat
+        8.5.</p>
       </attribute>
 
       <attribute name="clearReferencesStopThreads" required="false">



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