From cbaa8e480ecc7cdcf5eb280316b6d85a76ea651a Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 17 Feb 2010 02:38:11 +0000 Subject: [PATCH] Using finalizers like this is a bad idea. I did this years ago. At least call super() in a finally block, but I'll see if this can be cleaned. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6039 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/data/InvocationMarshaller.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/presents/data/InvocationMarshaller.java b/src/java/com/threerings/presents/data/InvocationMarshaller.java index e161ac8c7..e40e4d905 100644 --- a/src/java/com/threerings/presents/data/InvocationMarshaller.java +++ b/src/java/com/threerings/presents/data/InvocationMarshaller.java @@ -120,10 +120,13 @@ public class InvocationMarshaller protected void finalize () throws Throwable { - if (_invId != null && getClass() != ListenerMarshaller.class) { - log.warning("Invocation listener never responded to: " + _invId); + try { + if (_invId != null && getClass() != ListenerMarshaller.class) { + log.warning("Invocation listener never responded to: " + _invId); + } + } finally { + super.finalize(); } - super.finalize(); } /** On the server, the id of the invocation method. */