Author: markt
Date: Tue Oct 25 18:13:51 2011
New Revision: 1188841
URL: http://svn.apache.org/viewvc?rev=1188841&view=rev
Log:
Remove deprecated code from o.a.catalina.core
Modified:
tomcat/trunk/java/org/apache/catalina/Container.java
tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpResponse.java
tomcat/trunk/java/org/apache/catalina/core/ApplicationResponse.java
tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java
Modified: tomcat/trunk/java/org/apache/catalina/Container.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Container.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Container.java Tue Oct 25 18:13:51
2011
@@ -174,13 +174,6 @@ public interface Container extends Lifec
/**
- * Return an object which may be utilized for mapping to this component.
- */
- @Deprecated
- public Object getMappingObject();
-
-
- /**
* Return the JMX name associated with this container.
*/
public ObjectName getObjectName();
Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Tue Oct
25 18:13:51 2011
@@ -209,25 +209,9 @@ public class ApplicationContext
*/
private boolean newServletContextListenerAllowed = true;
- // --------------------------------------------------------- Public Methods
-
-
- /**
- * Return the resources object that is mapped to a specified path.
- * The path must begin with a "/" and is interpreted as relative to the
- * current context root.
- */
- @Deprecated
- public DirContext getResources() {
-
- return context.getResources();
-
- }
-
// ------------------------------------------------- ServletContext Methods
-
/**
* Return the value of the specified context attribute, if any;
* otherwise return <code>null</code>.
@@ -1500,10 +1484,6 @@ public class ApplicationContext
return this.context;
}
- @Deprecated
- protected Map<String,String> getReadonlyAttributes() {
- return this.readOnlyAttributes;
- }
/**
* Clear all application-created attributes.
*/
Modified:
tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpResponse.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpResponse.java?rev=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpResponse.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpResponse.java Tue
Oct 25 18:13:51 2011
@@ -42,23 +42,8 @@ import javax.servlet.http.HttpServletRes
class ApplicationHttpResponse extends HttpServletResponseWrapper {
-
// ----------------------------------------------------------- Constructors
-
- /**
- * Construct a new wrapped response around the specified servlet response.
- *
- * @param response The servlet response being wrapped
- */
- @Deprecated
- public ApplicationHttpResponse(HttpServletResponse response) {
-
- this(response, false);
-
- }
-
-
/**
* Construct a new wrapped response around the specified servlet response.
*
@@ -350,17 +335,6 @@ class ApplicationHttpResponse extends Ht
// -------------------------------------------------------- Package Methods
/**
- * Return the included flag for this response.
- */
- @Deprecated
- boolean isIncluded() {
-
- return (this.included);
-
- }
-
-
- /**
* Set the included flag for this response.
*
* @param included The new included flag
@@ -382,6 +356,4 @@ class ApplicationHttpResponse extends Ht
super.setResponse(response);
}
-
-
}
Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationResponse.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationResponse.java?rev=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationResponse.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationResponse.java Tue Oct
25 18:13:51 2011
@@ -40,23 +40,8 @@ import javax.servlet.ServletResponseWrap
class ApplicationResponse extends ServletResponseWrapper {
-
// ----------------------------------------------------------- Constructors
-
- /**
- * Construct a new wrapped response around the specified servlet response.
- *
- * @param response The servlet response being wrapped
- */
- @Deprecated
- public ApplicationResponse(ServletResponse response) {
-
- this(response, false);
-
- }
-
-
/**
* Construct a new wrapped response around the specified servlet response.
*
@@ -171,18 +156,6 @@ class ApplicationResponse extends Servle
// -------------------------------------------------------- Package Methods
-
- /**
- * Return the included flag for this response.
- */
- @Deprecated
- boolean isIncluded() {
-
- return (this.included);
-
- }
-
-
/**
* Set the included flag for this response.
*
@@ -193,6 +166,4 @@ class ApplicationResponse extends Servle
this.included = included;
}
-
-
}
Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Tue Oct 25
18:13:51 2011
@@ -437,16 +437,6 @@ public abstract class ContainerBase exte
/**
- * Return an object which may be utilized for mapping to this component.
- */
- @Deprecated
- @Override
- public Object getMappingObject() {
- return this;
- }
-
-
- /**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
@@ -1369,13 +1359,13 @@ public abstract class ContainerBase exte
// Ignore
}
if (!threadDone) {
- Container parent = (Container) getMappingObject();
ClassLoader cl =
Thread.currentThread().getContextClassLoader();
- if (parent.getLoader() != null) {
- cl = parent.getLoader().getClassLoader();
+ Loader loader = getLoader();
+ if (loader != null) {
+ cl = loader.getClassLoader();
}
- processChildren(parent, cl);
+ processChildren(ContainerBase.this, cl);
}
}
}
Modified: tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java?rev=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java Tue
Oct 25 18:13:51 2011
@@ -169,15 +169,6 @@ public class NamingContextListener
/**
- * Return the comp context.
- */
- @Deprecated
- public javax.naming.Context getCompContext() {
- return this.compCtx;
- }
-
-
- /**
* Return the env context.
*/
public javax.naming.Context getEnvContext() {
@@ -185,18 +176,8 @@ public class NamingContextListener
}
- /**
- * Return the associated naming context.
- */
- @Deprecated
- public NamingContext getNamingContext() {
- return (this.namingContext);
- }
-
-
// ---------------------------------------------- LifecycleListener Methods
-
/**
* Acknowledge the occurrence of the specified event.
*
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=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Oct 25
18:13:51 2011
@@ -310,12 +310,6 @@ public class StandardContext extends Con
/**
- * Compiler classpath to use.
- */
- private String compilerClasspath = null;
-
-
- /**
* Should we attempt to use cookies for session id communication?
*/
private boolean cookies = true;
@@ -639,12 +633,6 @@ public class StandardContext extends Con
/**
- * Filesystem based flag.
- */
- private boolean filesystemBased = false;
-
-
- /**
* Name of the associated naming context.
*/
private String namingContextName = null;
@@ -731,12 +719,6 @@ public class StandardContext extends Con
/**
- * Should we save the configuration.
- */
- private boolean saveConfig = true;
-
-
- /**
* The name to use for session cookies. <code>null</code> indicates that
* the name is controlled by the application.
*/
@@ -1267,18 +1249,6 @@ public class StandardContext extends Con
/**
- * Returns true if the resources associated with this context are
- * filesystem based.
- */
- @Deprecated
- public boolean isFilesystemBased() {
-
- return (filesystemBased);
-
- }
-
-
- /**
* Return the set of initialized application event listener objects,
* in the order they were specified in the web application deployment
* descriptor, for this application.
@@ -1779,24 +1749,6 @@ public class StandardContext extends Con
/**
- * Return the compiler classpath.
- */
- @Deprecated
- public String getCompilerClasspath(){
- return compilerClasspath;
- }
-
-
- /**
- * Set the compiler classpath.
- */
- @Deprecated
- public void setCompilerClasspath(String compilerClasspath) {
- this.compilerClasspath = compilerClasspath;
- }
-
-
- /**
* Set the display name of this web application.
*
* @param displayName The new display name
@@ -2246,17 +2198,6 @@ public class StandardContext extends Con
/**
- * Return the "replace welcome files" property.
- */
- @Deprecated
- public boolean isReplaceWelcomeFiles() {
-
- return (this.replaceWelcomeFiles);
-
- }
-
-
- /**
* Set the "replace welcome files" property.
*
* @param replaceWelcomeFiles The new property value
@@ -2469,7 +2410,6 @@ public class StandardContext extends Con
((BaseDirContext) resources).setAliases(getAliases());
}
if (resources instanceof FileDirContext) {
- filesystemBased = true;
((FileDirContext) resources).setAllowLinking(isAllowLinking());
}
this.webappResources = resources;
@@ -2569,24 +2509,6 @@ public class StandardContext extends Con
/**
- * Save config ?
- */
- @Deprecated
- public boolean isSaveConfig() {
- return saveConfig;
- }
-
-
- /**
- * Set save config flag.
- */
- @Deprecated
- public void setSaveConfig(boolean saveConfig) {
- this.saveConfig = saveConfig;
- }
-
-
- /**
* Return the clearReferencesStatic flag for this Context.
*/
public boolean getClearReferencesStatic() {
@@ -3490,15 +3412,6 @@ public class StandardContext extends Con
/**
- * FIXME: Fooling introspection ...
- */
- @Deprecated
- public Context findMappingObject() {
- return (Context) getMappingObject();
- }
-
-
- /**
* Return the message destination with the specified name, if any;
* otherwise, return <code>null</code>.
*
@@ -4830,7 +4743,6 @@ public class StandardContext extends Con
ProxyDirContext proxyDirContext =
new ProxyDirContext(env, webappResources);
if (webappResources instanceof FileDirContext) {
- filesystemBased = true;
((FileDirContext) webappResources).setAllowLinking
(isAllowLinking());
}
@@ -6330,30 +6242,6 @@ public class StandardContext extends Con
// ------------------------------------------------------------- Attributes
-
- /**
- * Return the naming resources associated with this web application.
- */
- @Deprecated
- public javax.naming.directory.DirContext getStaticResources() {
-
- return getResources();
-
- }
-
-
- /**
- * Return the naming resources associated with this web application.
- * FIXME: Fooling introspection ...
- */
- @Deprecated
- public javax.naming.directory.DirContext findStaticResources() {
-
- return getResources();
-
- }
-
-
/**
* Return the naming resources associated with this web application.
*/
@@ -6473,12 +6361,6 @@ public class StandardContext extends Con
return true;
}
- @Deprecated
- public void startRecursive() throws LifecycleException {
- // nothing to start recursive, the servlets will be started by
load-on-startup
- start();
- }
-
/**
* The J2EE Server ObjectName this module is deployed on.
*/
@@ -6515,16 +6397,6 @@ public class StandardContext extends Con
return startTime;
}
- @Deprecated
- public boolean isEventProvider() {
- return false;
- }
-
- @Deprecated
- public boolean isStatisticsProvider() {
- return false;
- }
-
private abstract static class RunnableWithLifecycleException
implements Runnable {
Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Tue Oct 25
18:13:51 2011
@@ -40,8 +40,6 @@ import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
import javax.servlet.ServletSecurityElement;
import javax.servlet.SingleThreadModel;
import javax.servlet.UnavailableException;
@@ -278,16 +276,6 @@ public class StandardWrapper extends Con
protected static Class<?>[] classType = new Class[]{ServletConfig.class};
- /**
- * Static class array used when the SecurityManager is turned on and
- * <code>Servlet.service</code> is invoked.
- */
- @Deprecated
- protected static Class<?>[] classTypeUsedInService = new Class[]{
- ServletRequest.class,
-
ServletResponse.class};
-
-
// ------------------------------------------------------------- Properties
@Override
@@ -995,15 +983,6 @@ public class StandardWrapper extends Con
/**
- * FIXME: Fooling introspection ...
- */
- @Deprecated
- public Wrapper findMappingObject() {
- return (Wrapper) getMappingObject();
- }
-
-
- /**
* Load and initialize an instance of this servlet, if there is not already
* at least one initialized instance. This can be used, for example, to
* load servlets that are marked in the deployment descriptor to be loaded
@@ -1539,47 +1518,22 @@ public class StandardWrapper extends Con
return swValve.getProcessingTime();
}
- @Deprecated
- public void setProcessingTime(long processingTime) {
- swValve.setProcessingTime(processingTime);
- }
-
public long getMaxTime() {
return swValve.getMaxTime();
}
- @Deprecated
- public void setMaxTime(long maxTime) {
- swValve.setMaxTime(maxTime);
- }
-
public long getMinTime() {
return swValve.getMinTime();
}
- @Deprecated
- public void setMinTime(long minTime) {
- swValve.setMinTime(minTime);
- }
-
public int getRequestCount() {
return swValve.getRequestCount();
}
- @Deprecated
- public void setRequestCount(int requestCount) {
- swValve.setRequestCount(requestCount);
- }
-
public int getErrorCount() {
return swValve.getErrorCount();
}
- @Deprecated
- public void setErrorCount(int errorCount) {
- swValve.setErrorCount(errorCount);
- }
-
/**
* Increment the error count used for monitoring.
*/
@@ -1592,11 +1546,6 @@ public class StandardWrapper extends Con
return loadTime;
}
- @Deprecated
- public void setLoadTime(long loadTime) {
- this.loadTime = loadTime;
- }
-
public int getClassLoadTime() {
return classLoadTime;
}
@@ -1904,23 +1853,4 @@ public class StandardWrapper extends Con
throws ListenerNotFoundException {
broadcaster.removeNotificationListener(listener);
}
-
-
- // -------------------------------------------------------------
Attributes
-
-
- @Deprecated
- public boolean isEventProvider() {
- return false;
- }
-
- @Deprecated
- public boolean isStateManageable() {
- return false;
- }
-
- @Deprecated
- public boolean isStatisticsProvider() {
- return false;
- }
}
Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=1188841&r1=1188840&r2=1188841&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java (original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java Tue Oct 25
18:13:51 2011
@@ -1002,16 +1002,6 @@ public class WebappLoader extends Lifecy
if (servletContext == null)
return;
- if (container instanceof StandardContext) {
- String baseClasspath =
- ((StandardContext) container).getCompilerClasspath();
- if (baseClasspath != null) {
- servletContext.setAttribute(Globals.CLASS_PATH_ATTR,
- baseClasspath);
- return;
- }
- }
-
StringBuilder classpath = new StringBuilder();
// Assemble the class path information from our class loader chain
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]