This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 59661e5 Remove unnecessary finalize() method 59661e5 is described below commit 59661e58d7875dc3ae4a2cdef3919445b4d25846 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org