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/08/21 21:19:47 UTC

[tomcat] branch 10.0.x updated: Remove unnecessary finalize() method

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
     new 86ae311  Remove unnecessary finalize() method
86ae311 is described below

commit 86ae311fb8dbf6532df949a3dd02f48f36344715
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Sat Aug 21 22:19:30 2021 +0100

    Remove unnecessary finalize() method
    
    If channel in non-null then it will retain a reference to the
    AbstractReplicatedMap so it won;t be eligible for GC and finalize() will
    never be called.
    
    If channel is null then finalize isn;t required as there are no
    references to clean up.
---
 java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
index 196b9c3..3fded0e 100644
--- a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
+++ b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
@@ -396,15 +396,6 @@ public abstract class AbstractReplicatedMap<K,V>
     }
 
     @Override
-    protected void finalize() throws Throwable {
-        try {
-            breakdown();
-        } finally {
-            super.finalize();
-        }
-    }
-
-    @Override
     public int hashCode() {
         return Arrays.hashCode(this.mapContextName);
     }

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