This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 620e06c  Remove code deprecated in 10.1.x apart from the APR Endpoint
620e06c is described below

commit 620e06c468a02ca98dc4beacf556dd12d2440877
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon May 24 17:34:09 2021 +0100

    Remove code deprecated in 10.1.x apart from the APR Endpoint
---
 .../apache/catalina/ha/deploy/FarmWarDeployer.java | 30 -------
 .../apache/catalina/manager/ManagerServlet.java    | 36 ---------
 java/org/apache/catalina/realm/JNDIRealm.java      | 24 ------
 java/org/apache/catalina/startup/HostConfig.java   | 51 ------------
 java/org/apache/tomcat/util/net/Acceptor.java      | 14 ----
 .../apache/tomcat/util/net/SSLImplementation.java  | 17 +---
 .../tomcat/util/net/jsse/JSSEImplementation.java   |  6 --
 .../apache/tomcat/util/net/jsse/JSSESupport.java   | 11 ---
 .../util/net/openssl/OpenSSLImplementation.java    |  6 --
 java/org/apache/tomcat/websocket/Util.java         | 19 -----
 java/org/apache/tomcat/websocket/WsSession.java    | 94 ----------------------
 .../tomcat/websocket/pojo/PojoMethodMapping.java   | 19 -----
 webapps/docs/changelog.xml                         |  3 +
 13 files changed, 4 insertions(+), 326 deletions(-)

diff --git a/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java 
b/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
index 4912b7f..c16c3e0 100644
--- a/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
+++ b/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
@@ -584,36 +584,6 @@ public class FarmWarDeployer extends ClusterListener
     }
 
     /**
-     * Verified if a context is being services.
-     * @param name The context name
-     * @return <code>true</code> if the context is being serviced
-     * @throws Exception Error invoking the deployer
-     * @deprecated Unused. Will be removed in Tomcat 10.1.x onwards.
-     */
-    @Deprecated
-    protected boolean isServiced(String name) throws Exception {
-        String[] params = { name };
-        String[] signature = { "java.lang.String" };
-        Boolean result = (Boolean) mBeanServer.invoke(oname, "isServiced",
-                params, signature);
-        return result.booleanValue();
-    }
-
-    /**
-     * Mark a context as being services.
-     * @param name The context name
-     * @throws Exception Error invoking the deployer
-     * @deprecated Unused. Will be removed in Tomcat 10.1.x onwards.
-     *             Use {@link #tryAddServiced}
-     */
-    @Deprecated
-    protected void addServiced(String name) throws Exception {
-        String[] params = { name };
-        String[] signature = { "java.lang.String" };
-        mBeanServer.invoke(oname, "addServiced", params, signature);
-    }
-
-    /**
      * Attempt to mark a context as being serviced
      * @param name The context name
      * @return {@code true} if the application was marked as being serviced and
diff --git a/java/org/apache/catalina/manager/ManagerServlet.java 
b/java/org/apache/catalina/manager/ManagerServlet.java
index 37cff7b..1b97692 100644
--- a/java/org/apache/catalina/manager/ManagerServlet.java
+++ b/java/org/apache/catalina/manager/ManagerServlet.java
@@ -1572,42 +1572,6 @@ public class ManagerServlet extends HttpServlet 
implements ContainerServlet {
 
 
     /**
-     * Invoke the isServiced method on the deployer.
-     *
-     * @param name The webapp name
-     * @return <code>true</code> if a webapp with that name is being serviced
-     * @throws Exception Propagate JMX invocation error
-     * @deprecated Unused. Will be removed in Tomcat 10.1.x onwards.
-     */
-    @Deprecated
-    protected boolean isServiced(String name)
-        throws Exception {
-        String[] params = { name };
-        String[] signature = { "java.lang.String" };
-        Boolean result =
-            (Boolean) mBeanServer.invoke(oname, "isServiced", params, 
signature);
-        return result.booleanValue();
-    }
-
-
-    /**
-     * Invoke the addServiced method on the deployer.
-     *
-     * @param name The webapp name
-     * @throws Exception Propagate JMX invocation error
-     * @deprecated Unused. Will be removed in Tomcat 10.1.x onwards.
-     *             Use {@link #tryAddServiced}
-     */
-    @Deprecated
-    protected void addServiced(String name)
-        throws Exception {
-        String[] params = { name };
-        String[] signature = { "java.lang.String" };
-        mBeanServer.invoke(oname, "addServiced", params, signature);
-    }
-
-
-    /**
      * Attempt to mark a context as being serviced
      * @param name The context name
      * @return {@code true} if the application was marked as being serviced and
diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index b6318b4..7650c4e 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -2762,30 +2762,6 @@ public class JNDIRealm extends RealmBase {
      * @param inString string to escape according to RFC 2254 guidelines
      *
      * @return String the escaped/encoded result
-     *
-     * @deprecated Will be removed in Tomcat 10.1.x onwards
-     */
-    @Deprecated
-    protected String doRFC2254Encoding(String inString) {
-        return doFilterEscaping(inString);
-    }
-
-
-    /**
-     * Given an LDAP search string, returns the string with certain characters
-     * escaped according to RFC 2254 guidelines.
-     * The character mapping is as follows:
-     *     char -&gt;  Replacement
-     *    ---------------------------
-     *     *  -&gt; \2a
-     *     (  -&gt; \28
-     *     )  -&gt; \29
-     *     \  -&gt; \5c
-     *     \0 -&gt; \00
-     *
-     * @param inString string to escape according to RFC 2254 guidelines
-     *
-     * @return String the escaped/encoded result
      */
     protected String doFilterEscaping(String inString) {
         if (inString == null) {
diff --git a/java/org/apache/catalina/startup/HostConfig.java 
b/java/org/apache/catalina/startup/HostConfig.java
index 9cd23e7..b586b53 100644
--- a/java/org/apache/catalina/startup/HostConfig.java
+++ b/java/org/apache/catalina/startup/HostConfig.java
@@ -147,16 +147,6 @@ public class HostConfig implements LifecycleListener {
 
 
     /**
-     * List of applications which are being serviced, and shouldn't be
-     * deployed/undeployed/redeployed at the moment.
-     * @deprecated Unused. Will be removed in Tomcat 10.1.x onwards. Replaced
-     *             by the private <code>servicedSet</code> field.
-     */
-    @Deprecated
-    protected final ArrayList<String> serviced = new ArrayList<>();
-
-
-    /**
      * Set of applications which are being serviced, and shouldn't be
      * deployed/undeployed/redeployed at the moment.
      */
@@ -334,9 +324,6 @@ public class HostConfig implements LifecycleListener {
      */
     public boolean tryAddServiced(String name) {
         if (servicedSet.add(name)) {
-            synchronized (this) {
-                serviced.add(name);
-            }
             return true;
         }
         return false;
@@ -344,49 +331,11 @@ public class HostConfig implements LifecycleListener {
 
 
     /**
-     * Add a serviced application to the list if it is not already present. If
-     * the application is already in the list of serviced applications this
-     * method is a NO-OP.
-     *
-     * @param name the context name
-     *
-     * @deprecated Unused. This method will be removed in Tomcat 10.1.x 
onwards.
-     *             Use {@link #tryAddServiced} instead.
-     */
-    @Deprecated
-    public void addServiced(String name) {
-        servicedSet.add(name);
-        synchronized (this) {
-            serviced.add(name);
-        }
-    }
-
-
-    /**
-     * Is application serviced ?
-     *
-     * @param name the context name
-     *
-     * @return state of the application
-     *
-     * @deprecated Unused. This method will be removed in Tomcat 10.1.x 
onwards.
-     *             Use {@link #tryAddServiced} instead.
-     */
-    @Deprecated
-    public boolean isServiced(String name) {
-        return servicedSet.contains(name);
-    }
-
-
-    /**
      * Removed a serviced application from the list.
      * @param name the context name
      */
     public void removeServiced(String name) {
         servicedSet.remove(name);
-        synchronized (this) {
-            serviced.remove(name);
-        }
     }
 
 
diff --git a/java/org/apache/tomcat/util/net/Acceptor.java 
b/java/org/apache/tomcat/util/net/Acceptor.java
index ff810e9..9088854 100644
--- a/java/org/apache/tomcat/util/net/Acceptor.java
+++ b/java/org/apache/tomcat/util/net/Acceptor.java
@@ -157,20 +157,6 @@ public class Acceptor<U> implements Runnable {
 
 
     /**
-     * Signals the Acceptor to stop, waiting at most 10 seconds for the stop to
-     * complete before returning. If the stop does not complete in that time a
-     * warning will be logged.
-     *
-     * @deprecated This method will be removed in Tomcat 10.1.x onwards.
-     *             Use {@link #stop(int)} instead.
-     */
-    @Deprecated
-    public void stop() {
-        stop(10);
-    }
-
-
-    /**
      * Signals the Acceptor to stop, optionally waiting for that stop process
      * to complete before returning. If a wait is requested and the stop does
      * not complete in that time a warning will be logged.
diff --git a/java/org/apache/tomcat/util/net/SSLImplementation.java 
b/java/org/apache/tomcat/util/net/SSLImplementation.java
index 4bafd25..ec385cc 100644
--- a/java/org/apache/tomcat/util/net/SSLImplementation.java
+++ b/java/org/apache/tomcat/util/net/SSLImplementation.java
@@ -76,22 +76,7 @@ public abstract class SSLImplementation {
      * @return An instance of SSLSupport based on the given session and the
      *         provided additional attributes
      */
-    public SSLSupport getSSLSupport(SSLSession session, 
Map<String,List<String>> additionalAttributes) {
-        return getSSLSupport(session);
-    }
-
-    /**
-     * Obtain an instance of SSLSupport.
-     *
-     * @param session   The TLS session
-     *
-     * @return An instance of SSLSupport based on the given session.
-     *
-     * @deprecated This will be removed in Tomcat 10.1.x onwards.
-     *             Use {@link #getSSLSupport(SSLSession, Map)}.
-     */
-    @Deprecated
-    public abstract SSLSupport getSSLSupport(SSLSession session);
+    public abstract SSLSupport getSSLSupport(SSLSession session, 
Map<String,List<String>> additionalAttributes);
 
     public abstract SSLUtil getSSLUtil(SSLHostConfigCertificate certificate);
 
diff --git a/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java 
b/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
index 2c90513..be5422b 100644
--- a/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
+++ b/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
@@ -43,12 +43,6 @@ public class JSSEImplementation extends SSLImplementation {
         JSSESupport.init();
     }
 
-    @Deprecated
-    @Override
-    public SSLSupport getSSLSupport(SSLSession session) {
-        return getSSLSupport(session, null);
-    }
-
     @Override
     public SSLSupport getSSLSupport(SSLSession session, Map<String, 
List<String>> additionalAttributes) {
         return new JSSESupport(session, additionalAttributes);
diff --git a/java/org/apache/tomcat/util/net/jsse/JSSESupport.java 
b/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
index 10e9417..d293137 100644
--- a/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
+++ b/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
@@ -77,17 +77,6 @@ public class JSSESupport implements SSLSupport, 
SSLSessionManager {
     private SSLSession session;
     private Map<String,List<String>> additionalAttributes;
 
-    /**
-     * @param session SSLSession from which information is to be extracted
-     *
-     * @deprecated This will be removed in Tomcat 10.1.x onwards
-     *             Use {@link JSSESupport#JSSESupport(SSLSession, Map)}
-     */
-    @Deprecated
-    public JSSESupport(SSLSession session) {
-        this(session, null);
-    }
-
     public JSSESupport(SSLSession session, Map<String,List<String>> 
additionalAttributes) {
         this.session = session;
         this.additionalAttributes = additionalAttributes;
diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLImplementation.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLImplementation.java
index da36f08..b32b86c 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLImplementation.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLImplementation.java
@@ -29,12 +29,6 @@ import org.apache.tomcat.util.net.jsse.JSSESupport;
 
 public class OpenSSLImplementation extends SSLImplementation {
 
-    @Deprecated
-    @Override
-    public SSLSupport getSSLSupport(SSLSession session) {
-        return new JSSESupport(session);
-    }
-
     @Override
     public SSLSupport getSSLSupport(SSLSession session, Map<String, 
List<String>> additionalAttributes) {
         return new JSSESupport(session, additionalAttributes);
diff --git a/java/org/apache/tomcat/websocket/Util.java 
b/java/org/apache/tomcat/websocket/Util.java
index 6095f54..e41c955 100644
--- a/java/org/apache/tomcat/websocket/Util.java
+++ b/java/org/apache/tomcat/websocket/Util.java
@@ -336,25 +336,6 @@ public class Util {
     /**
      * Build the list of decoder entries from a set of decoder implementations.
      *
-     * @param decoderClazzes Decoder implementation classes
-     *
-     * @return List of mappings from target type to associated decoder
-     *
-     * @throws DeploymentException If a provided decoder class is not valid
-     *
-     * @deprecated Will be removed in Tomcat 10.1.x.
-     *             Use {@link Util#getDecoders(List, InstanceManager)}
-     */
-    @Deprecated
-    public static List<DecoderEntry> getDecoders(List<Class<? extends 
Decoder>> decoderClazzes)
-            throws DeploymentException {
-        return getDecoders(decoderClazzes, null);
-    }
-
-
-    /**
-     * Build the list of decoder entries from a set of decoder implementations.
-     *
      * @param decoderClazzes    Decoder implementation classes
      * @param instanceManager   Instance manager to use to create Decoder
      *                              instances
diff --git a/java/org/apache/tomcat/websocket/WsSession.java 
b/java/org/apache/tomcat/websocket/WsSession.java
index 0120845..31200bd 100644
--- a/java/org/apache/tomcat/websocket/WsSession.java
+++ b/java/org/apache/tomcat/websocket/WsSession.java
@@ -301,100 +301,6 @@ public class WsSession implements Session {
     }
 
 
-    /**
-     * Creates a new WebSocket session for communication between the two
-     * provided end points. The result of {@link 
Thread#getContextClassLoader()}
-     * at the time this constructor is called will be used when calling
-     * {@link Endpoint#onClose(Session, CloseReason)}.
-     *
-     * @param localEndpoint        The end point managed by this code
-     * @param wsRemoteEndpoint     The other / remote endpoint
-     * @param wsWebSocketContainer The container that created this session
-     * @param requestUri           The URI used to connect to this endpoint or
-     *                             <code>null</code> is this is a client 
session
-     * @param requestParameterMap  The parameters associated with the request
-     *                             that initiated this session or
-     *                             <code>null</code> if this is a client 
session
-     * @param queryString          The query string associated with the request
-     *                             that initiated this session or
-     *                             <code>null</code> if this is a client 
session
-     * @param userPrincipal        The principal associated with the request
-     *                             that initiated this session or
-     *                             <code>null</code> if this is a client 
session
-     * @param httpSessionId        The HTTP session ID associated with the
-     *                             request that initiated this session or
-     *                             <code>null</code> if this is a client 
session
-     * @param negotiatedExtensions The agreed extensions to use for this 
session
-     * @param subProtocol          The agreed subprotocol to use for this
-     *                             session
-     * @param pathParameters       The path parameters associated with the
-     *                             request that initiated this session or
-     *                             <code>null</code> if this is a client 
session
-     * @param secure               Was this session initiated over a secure
-     *                             connection?
-     * @param endpointConfig       The configuration information for the
-     *                             endpoint
-     * @throws DeploymentException if an invalid encode is specified
-     *
-     * @deprecated  Unused. This will be removed in Tomcat 10.1
-     */
-    @Deprecated
-    public WsSession(Endpoint localEndpoint,
-            WsRemoteEndpointImplBase wsRemoteEndpoint,
-            WsWebSocketContainer wsWebSocketContainer,
-            URI requestUri, Map<String, List<String>> requestParameterMap,
-            String queryString, Principal userPrincipal, String httpSessionId,
-            List<Extension> negotiatedExtensions, String subProtocol, 
Map<String, String> pathParameters,
-            boolean secure, EndpointConfig endpointConfig) throws 
DeploymentException {
-        this.localEndpoint = localEndpoint;
-        this.wsRemoteEndpoint = wsRemoteEndpoint;
-        this.wsRemoteEndpoint.setSession(this);
-        this.remoteEndpointAsync = new WsRemoteEndpointAsync(wsRemoteEndpoint);
-        this.remoteEndpointBasic = new WsRemoteEndpointBasic(wsRemoteEndpoint);
-        this.webSocketContainer = wsWebSocketContainer;
-        applicationClassLoader = 
Thread.currentThread().getContextClassLoader();
-        
wsRemoteEndpoint.setSendTimeout(wsWebSocketContainer.getDefaultAsyncSendTimeout());
-        this.maxBinaryMessageBufferSize = 
webSocketContainer.getDefaultMaxBinaryMessageBufferSize();
-        this.maxTextMessageBufferSize = 
webSocketContainer.getDefaultMaxTextMessageBufferSize();
-        this.maxIdleTimeout = 
webSocketContainer.getDefaultMaxSessionIdleTimeout();
-        this.requestUri = requestUri;
-        if (requestParameterMap == null) {
-            this.requestParameterMap = Collections.emptyMap();
-        } else {
-            this.requestParameterMap = requestParameterMap;
-        }
-        this.queryString = queryString;
-        this.userPrincipal = userPrincipal;
-        this.httpSessionId = httpSessionId;
-        this.negotiatedExtensions = negotiatedExtensions;
-        if (subProtocol == null) {
-            this.subProtocol = "";
-        } else {
-            this.subProtocol = subProtocol;
-        }
-        this.pathParameters = pathParameters;
-        this.secure = secure;
-        this.wsRemoteEndpoint.setEncoders(endpointConfig);
-        this.endpointConfig = endpointConfig;
-
-        this.userProperties.putAll(endpointConfig.getUserProperties());
-        this.id = Long.toHexString(ids.getAndIncrement());
-
-        InstanceManager instanceManager = getInstanceManager();
-        if (instanceManager != null) {
-            try {
-                instanceManager.newInstance(localEndpoint);
-            } catch (Exception e) {
-                throw new 
DeploymentException(sm.getString("wsSession.instanceNew"), e);
-            }
-        }
-
-        if (log.isDebugEnabled()) {
-            log.debug(sm.getString("wsSession.created", id));
-        }
-    }
-
-
     public InstanceManager getInstanceManager() {
         return webSocketContainer.getInstanceManager(applicationClassLoader);
     }
diff --git a/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java 
b/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
index ce07c34..75e8a32 100644
--- a/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
+++ b/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
@@ -77,25 +77,6 @@ public class PojoMethodMapping {
      * @param clazzPojo         POJO implementation class
      * @param decoderClazzes    Set of potential decoder classes
      * @param wsPath            Path at which the endpoint will be deployed
-     *
-     * @throws DeploymentException If the mapping cannot be completed
-     *
-     * @deprecated Will be removed in Tomcat 10.1.x
-     *             Use (@link {@link #PojoMethodMapping(Class, List, String, 
InstanceManager)}
-     */
-    @Deprecated
-    public PojoMethodMapping(Class<?> clazzPojo, List<Class<? extends 
Decoder>> decoderClazzes, String wsPath)
-            throws DeploymentException {
-        this(clazzPojo, decoderClazzes, wsPath, null);
-    }
-
-
-    /**
-     * Create a method mapping for the given POJO
-     *
-     * @param clazzPojo         POJO implementation class
-     * @param decoderClazzes    Set of potential decoder classes
-     * @param wsPath            Path at which the endpoint will be deployed
      * @param instanceManager   Instance manager to use to create Decoder 
instances
      *
      * @throws DeploymentException If the mapping cannot be completed
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1eda6eb..9c11ad4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,9 @@
         This release contains all of the changes upto and including those in
         Apache Tomcat 10.0.6 plus the additional changes listed below. (markt)
       </scode>
+      <scode>
+        Remove code previously marked for removal in Tomcat 10.1.x. (markt)
+      </scode>
     </changelog>
   </subsection>
   <subsection name="Catalina">

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

Reply via email to