From 8721e357295c50d586f103aeadd6efac7714fb60 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 22 Sep 2016 14:50:53 +0100 Subject: [PATCH] JAL-2216 finalize call super.finalize() --- src/jalview/javascript/JSFunctionExec.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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"); -- 1.7.10.2