From: gmungoc Date: Thu, 22 Sep 2016 13:50:53 +0000 (+0100) Subject: JAL-2216 finalize call super.finalize() X-Git-Tag: Release_2_10_0~39^2^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8721e357295c50d586f103aeadd6efac7714fb60;p=jalview.git JAL-2216 finalize call super.finalize() --- diff --git a/src/jalview/javascript/JSFunctionExec.java b/src/jalview/javascript/JSFunctionExec.java index 4d7c0d4..6daf275 100644 --- a/src/jalview/javascript/JSFunctionExec.java +++ b/src/jalview/javascript/JSFunctionExec.java @@ -39,7 +39,8 @@ public class JSFunctionExec implements Runnable jvlite.setExecutor(this); } - public void finalize() + @Override + protected void finalize() throws Throwable { jvlite = null; executor = null; @@ -48,6 +49,7 @@ public class JSFunctionExec implements Runnable jsExecQueue.clear(); } jsExecQueue = null; + super.finalize(); } private Vector jsExecQueue; @@ -82,6 +84,7 @@ public class JSFunctionExec implements Runnable executor = null; } + @Override public void run() { while (jsExecQueue != null) @@ -164,6 +167,7 @@ public class JSFunctionExec implements Runnable final Exception[] jsex = new Exception[1]; Runnable exec = new Runnable() { + @Override public void run() { try @@ -196,7 +200,7 @@ public class JSFunctionExec implements Runnable if (jex instanceof netscape.javascript.JSException && jvlite.jsfallbackEnabled) { - jsex[0] = (netscape.javascript.JSException) jex; + jsex[0] = jex; if (jvlite.debug) { System.err.println("Falling back to javascript: url call");