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 2021/11/29 09:41:54 UTC
[tomcat] branch main updated: Remove unused code
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 2ac59cb Remove unused code
2ac59cb is described below
commit 2ac59cbf8469eef503b50849476fb9bd372f0057
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Nov 29 09:40:15 2021 +0000
Remove unused code
---
.../catalina/manager/StatusManagerServlet.java | 31 +++-------------------
1 file changed, 4 insertions(+), 27 deletions(-)
diff --git a/java/org/apache/catalina/manager/StatusManagerServlet.java b/java/org/apache/catalina/manager/StatusManagerServlet.java
index aed8163..2ba347b 100644
--- a/java/org/apache/catalina/manager/StatusManagerServlet.java
+++ b/java/org/apache/catalina/manager/StatusManagerServlet.java
@@ -60,15 +60,6 @@ public class StatusManagerServlet
/**
- * Vector of protocol handlers object names.
- *
- * @deprecated Unused. Will be removed in Tomcat 10.1.x
- */
- @Deprecated
- protected final Vector<ObjectName> protocolHandlers = new Vector<>();
-
-
- /**
* Vector of thread pools object names.
*/
protected final Vector<ObjectName> threadPools = new Vector<>();
@@ -107,23 +98,13 @@ public class StatusManagerServlet
try {
- // Query protocol handlers
- String onStr = "*:type=ProtocolHandler,*";
+ // Query Thread Pools
+ String onStr = "*:type=ThreadPool,*";
ObjectName objectName = new ObjectName(onStr);
Set<ObjectInstance> set = mBeanServer.queryMBeans(objectName, null);
Iterator<ObjectInstance> iterator = set.iterator();
while (iterator.hasNext()) {
ObjectInstance oi = iterator.next();
- protocolHandlers.addElement(oi.getObjectName());
- }
-
- // Query Thread Pools
- onStr = "*:type=ThreadPool,*";
- objectName = new ObjectName(onStr);
- set = mBeanServer.queryMBeans(objectName, null);
- iterator = set.iterator();
- while (iterator.hasNext()) {
- ObjectInstance oi = iterator.next();
threadPools.addElement(oi.getObjectName());
}
@@ -363,9 +344,7 @@ public class StatusManagerServlet
(MBeanServerNotification.REGISTRATION_NOTIFICATION)) {
String type = objectName.getKeyProperty("type");
if (type != null) {
- if (type.equals("ProtocolHandler")) {
- protocolHandlers.addElement(objectName);
- } else if (type.equals("ThreadPool")) {
+ if (type.equals("ThreadPool")) {
threadPools.addElement(objectName);
} else if (type.equals("GlobalRequestProcessor")) {
globalRequestProcessors.addElement(objectName);
@@ -377,9 +356,7 @@ public class StatusManagerServlet
(MBeanServerNotification.UNREGISTRATION_NOTIFICATION)) {
String type = objectName.getKeyProperty("type");
if (type != null) {
- if (type.equals("ProtocolHandler")) {
- protocolHandlers.removeElement(objectName);
- } else if (type.equals("ThreadPool")) {
+ if (type.equals("ThreadPool")) {
threadPools.removeElement(objectName);
} else if (type.equals("GlobalRequestProcessor")) {
globalRequestProcessors.removeElement(objectName);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org