Author: markt
Date: Sat Nov 22 03:19:43 2008
New Revision: 719835
URL: http://svn.apache.org/viewvc?rev=719835&view=rev
Log:
Remove deprecated code.
Some code made private rather than removed based on code comments.
Calls to deprecated methods changed to use appropriate replacements.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java
tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java
tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java
tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java
tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java Sat Nov 22
03:19:43 2008
@@ -188,24 +188,6 @@
* in the order originally registered through the <code>add()</code>
* method.
*
- * @param pattern Nesting pattern to be matched
- *
- * @deprecated Call match(namespaceURI,pattern) instead.
- */
- public List<Rule> match(String pattern) {
-
- return (match(null, pattern));
-
- }
-
-
- /**
- * Return a List of all registered Rule instances that match the specified
- * nesting pattern, or a zero-length List if there are no matches. If more
- * than one Rule instance matches, they <strong>must</strong> be returned
- * in the order originally registered through the <code>add()</code>
- * method.
- *
* @param namespaceURI Namespace URI for which to select matching rules,
* or <code>null</code> to match regardless of namespace URI
* @param pattern Nesting pattern to be matched
Modified: tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java Sat Nov 22
03:19:43 2008
@@ -211,26 +211,6 @@
return true;
}
- /**
- * @deprecated - Not used
- */
- public static boolean checkName( String name ) {
- if (!isToken(name)
- || name.equalsIgnoreCase("Comment") // rfc2019
- || name.equalsIgnoreCase("Discard") // rfc2965
- || name.equalsIgnoreCase("Domain") // rfc2019
- || name.equalsIgnoreCase("Expires") // Netscape
- || name.equalsIgnoreCase("Max-Age") // rfc2019
- || name.equalsIgnoreCase("Path") // rfc2019
- || name.equalsIgnoreCase("Secure") // rfc2019
- || name.equalsIgnoreCase("Version") // rfc2019
- // TODO remaining RFC2965 attributes
- ) {
- return false;
- }
- return true;
- }
-
// -------------------- Cookie parsing tools
@@ -344,21 +324,6 @@
headerBuf.append(buf);
}
- /**
- * @deprecated - Not used
- */
- @Deprecated
- public static void maybeQuote (int version, StringBuffer buf,String value)
{
- // special case - a \n or \r shouldn't happen in any case
- if (isToken(value)) {
- buf.append(value);
- } else {
- buf.append('"');
- buf.append(escapeDoubleQuotes(value,0,value.length()));
- buf.append('"');
- }
- }
-
public static boolean alreadyQuoted (String value) {
if (value==null || value.length()==0) return false;
return (value.charAt(0)=='\"' && value.charAt(value.length()-1)=='\"');
Modified:
tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java
Sat Nov 22 03:19:43 2008
@@ -224,7 +224,7 @@
private synchronized void registerNotifications( FixedNotificationFilter
filter ) {
String names[]=filter.getNames();
- Registry reg=Registry.getRegistry();
+ Registry reg=Registry.getRegistry(null, null);
for( int i=0; i<names.length; i++ ) {
int code=reg.getId(null, names[i]);
if( hooks.length < code ) {
Modified: tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java Sat Nov 22
03:19:43 2008
@@ -453,57 +453,6 @@
descriptorsByClass.remove( bean.getType());
}
- // -------------------- Deprecated 1.0 methods --------------------
-
- /**
- * Factory method to create (if necessary) and return our
- * <code>MBeanServer</code> instance.
- *
- * @since 1.0
- * @deprecated Use the instance method
- */
- public static MBeanServer getServer() {
- return Registry.getRegistry().getMBeanServer();
- }
-
- /**
- * Set the <code>MBeanServer</code> to be utilized for our
- * registered management beans.
- *
- * @param mbeanServer The new <code>MBeanServer</code> instance
- * @since 1.0
- * @deprecated Use the instance method
- */
- public static void setServer(MBeanServer mbeanServer) {
- Registry.getRegistry().setMBeanServer(mbeanServer);
- }
-
- /**
- * Load the registry from the XML input found in the specified input
- * stream.
- *
- * @param stream InputStream containing the registry configuration
- * information
- *
- * @exception Exception if any parsing or processing error occurs
- * @deprecated use normal class method instead
- * @since 1.0
- */
- public static void loadRegistry(InputStream stream) throws Exception {
- Registry registry = getRegistry();
- registry.loadMetadata(stream);
- }
-
- /** Get a "singelton" registry, or one per thread if setUseContextLoader
- * was called
- *
- * @deprecated Not enough info - use the method that takes CL and domain
- * @since 1.0
- */
- public synchronized static Registry getRegistry() {
- return getRegistry(null, null);
- }
-
// -------------------- Helpers --------------------
/** Get the type of an attribute of the object, from the metadata.
@@ -846,16 +795,15 @@
return;
}
- /**Experimental. Will become private, some code may still use it
- *
+ /**
* @param sourceType
* @param source
* @param param
* @throws Exception
- * @deprecated
+
*/
- public void loadDescriptors(String sourceType, Object source, String param)
- throws Exception {
+ private void loadDescriptors(String sourceType, Object source,
+ String param) throws Exception {
load(sourceType, source, param);
}
@@ -974,21 +922,6 @@
loadDescriptors("MbeansDescriptorsDigesterSource", source, null );
}
- /** @deprecated - may still be used in code using pre-1.1 builds
- */
- public void registerComponent(Object bean, String domain, String type,
- String name)
- throws Exception
- {
- StringBuffer sb=new StringBuffer();
- sb.append( domain ).append(":");
- sb.append( name );
- String nameStr=sb.toString();
- ObjectName oname=new ObjectName( nameStr );
- registerComponent(bean, oname, type );
- }
-
-
// should be removed
public void unregisterComponent( String domain, String name ) {
@@ -1002,19 +935,4 @@
}
}
-
- /**
- * Load the registry from a cached .ser file. This is typically 2-3 times
- * faster than parsing the XML.
- *
- * @param source Source to be used to load. Can be an InputStream or URL.
- *
- * @exception Exception if any parsing or processing error occurs
- * @deprecated Loaded automatically or using a File or Url ending in .ser
- */
- public void loadCachedDescriptors( Object source )
- throws Exception
- {
- loadDescriptors("MbeansDescriptorsSerSource", source, null );
- }
}
Modified:
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
Sat Nov 22 03:19:43 2008
@@ -80,7 +80,7 @@
}
public void execute() throws Exception {
- if( registry==null ) registry=Registry.getRegistry();
+ if( registry==null ) registry=Registry.getRegistry(null, null);
try {
InputStream stream=(InputStream)source;
Modified:
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
Sat Nov 22 03:19:43 2008
@@ -77,7 +77,7 @@
}
public void execute() throws Exception {
- if( registry==null ) registry=Registry.getRegistry();
+ if( registry==null ) registry=Registry.getRegistry(null, null);
try {
ManagedBean managed = createManagedBean(registry, null,
(Class<?>)source, type);
Modified:
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
Sat Nov 22 03:19:43 2008
@@ -70,7 +70,7 @@
}
public void execute() throws Exception {
- if( registry==null ) registry=Registry.getRegistry();
+ if( registry==null ) registry=Registry.getRegistry(null, null);
long t1=System.currentTimeMillis();
try {
InputStream stream=null;
Modified:
tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java
Sat Nov 22 03:19:43 2008
@@ -123,7 +123,7 @@
public void init() throws Exception {
if( mbeans==null) execute();
- if( registry==null ) registry=Registry.getRegistry();
+ if( registry==null ) registry=Registry.getRegistry(null, null);
registry.invoke(mbeans, "init", false);
}
@@ -137,7 +137,7 @@
}
public void execute() throws Exception {
- if( registry==null ) registry=Registry.getRegistry();
+ if( registry==null ) registry=Registry.getRegistry(null, null);
try {
InputStream stream=getInputStream();
long t1=System.currentTimeMillis();
@@ -160,7 +160,8 @@
firstMbeanN=descriptorsN;
}
- MBeanServer server = Registry.getServer();
+ MBeanServer server =
+ Registry.getRegistry(null, null).getMBeanServer();
// XXX Not very clean... Just a workaround
if( ! loaderLoaded ) {
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java Sat
Nov 22 03:19:43 2008
@@ -28,22 +28,6 @@
*/
public interface TcpConnectionHandler {
- /** Add informations about the a "controler" object
- * specific to the server. In tomcat it will be a
- * ContextManager.
- * @deprecated This has nothing to do with TcpHandling,
- * was used as a workaround
- */
- public void setServer(Object manager);
-
-
- /** Used to pass config informations to the handler.
- *
- * @deprecated This has nothing to do with Tcp,
- * was used as a workaround.
- */
- public void setAttribute(String name, Object value );
-
/** Called before the call to processConnection.
* If the thread is reused, init() should be called once per thread.
*
Modified: tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java?rev=719835&r1=719834&r2=719835&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java Sat Nov 22
03:19:43 2008
@@ -525,12 +525,6 @@
currentThreadCount = toOpen;
}
- /** @deprecated */
- void log( String s ) {
- log.info(s);
- //loghelper.flush();
- }
-
/**
* Periodically execute an action - cleanup in this case
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]