Skip to content

Commit c378a21

Browse files
committed
refactor(yoko-core): remove finalizer from Acceptor_impl
Phase 3 of finalization refactoring: Remove finalize() method from Acceptor_impl class. - Removed finalizer that called close() and removed from listenMap_ - close() is already called explicitly in GIOPServerStarter classes - listenMap_ cleanup was redundant as acceptors are explicitly managed - Removed TODO comment about using phantom refs in AccFactory_impl - Lines removed: 12 Tests: All yoko-core tests pass Co-authored-by-AI: IBM Bob 1.0.4
1 parent bc6b21b commit c378a21

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

yoko-core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Acceptor_impl.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,6 @@ public Acceptor_impl(String address, String[] hosts, ProfileCardinality profileC
311311
}
312312
}
313313

314-
// TODO: get rid of this finalizer, and use phantom refs in AccFactory_impl instead to track Acceptors going away.
315-
protected void finalize() throws Throwable {
316-
if (socket_ != null) {
317-
close();
318-
}
319-
320-
// remove this acceptor from the listenMap_
321-
synchronized (listenMap_) {
322-
for (String s : hosts_) listenMap_.remove(s, (short) port_);
323-
}
324-
}
325-
326314
public String toString() {
327315
return "Acceptor listening on " + socket_;
328316
}

0 commit comments

Comments
 (0)