You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2019/05/28 21:06:25 UTC

[tomcat] branch master updated: Remove useless method parameters

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 99e2bb3  Remove useless method parameters
99e2bb3 is described below

commit 99e2bb3f285993f7d4861258d2c69d7988c6b5ee
Author: remm <re...@apache.org>
AuthorDate: Tue May 28 23:06:14 2019 +0200

    Remove useless method parameters
---
 java/org/apache/catalina/core/FrameworkListener.java           | 10 ++++------
 .../catalina/core/ThreadLocalLeakPreventionListener.java       |  6 +++---
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/catalina/core/FrameworkListener.java b/java/org/apache/catalina/core/FrameworkListener.java
index b2a4f27..4b8234b 100644
--- a/java/org/apache/catalina/core/FrameworkListener.java
+++ b/java/org/apache/catalina/core/FrameworkListener.java
@@ -57,11 +57,9 @@ public abstract class FrameworkListener implements LifecycleListener, ContainerL
     public void containerEvent(ContainerEvent event) {
         String type = event.getType();
         if (Container.ADD_CHILD_BEFORE_START_EVENT.equals(type)) {
-            processContainerAddChild(event.getContainer(),
-                    (Container) event.getData());
+            processContainerAddChild((Container) event.getData());
         } else if (Container.REMOVE_CHILD_BEFORE_STOP_EVENT.equals(type)) {
-            processContainerRemoveChild(event.getContainer(),
-                    (Container) event.getData());
+            processContainerRemoveChild((Container) event.getData());
         }
     }
 
@@ -95,7 +93,7 @@ public abstract class FrameworkListener implements LifecycleListener, ContainerL
         context.addLifecycleListener(createLifecycleListener(context));
     }
 
-    protected void processContainerAddChild(Container parent, Container child) {
+    protected void processContainerAddChild(Container child) {
         if (child instanceof Context) {
             registerContextListener((Context) child);
         } else if (child instanceof Engine) {
@@ -105,7 +103,7 @@ public abstract class FrameworkListener implements LifecycleListener, ContainerL
         }
     }
 
-    protected void processContainerRemoveChild(Container parent, Container child) {
+    protected void processContainerRemoveChild(Container child) {
         if (child instanceof Host || child instanceof Engine) {
             child.removeContainerListener(this);
         }
diff --git a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
index 21905ab..eb33b18 100644
--- a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
+++ b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
@@ -107,13 +107,13 @@ public class ThreadLocalLeakPreventionListener extends FrameworkListener {
 
     }
 
-    protected void processContainerRemoveChild(Container parent,
-        Container child) {
+    @Override
+    protected void processContainerRemoveChild(Container child) {
         if (child instanceof Context) {
             Context context = (Context) child;
             context.removeLifecycleListener(this);
         } else {
-            super.processContainerRemoveChild(parent, child);
+            super.processContainerRemoveChild(child);
         }
     }
 


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