X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjavascript%2FJSFunctionExec.java;h=6daf275169a1e4a3a2a7669e1d4724ae18117be4;hb=f14ab8c56014768bb0f94df591e83511aa506bdd;hp=09036e65fe14d8be8ba1e66556fe30059d11c2b0;hpb=ad20cd92225f2ee8c251d39b00b90555d382a616;p=jalview.git diff --git a/src/jalview/javascript/JSFunctionExec.java b/src/jalview/javascript/JSFunctionExec.java index 09036e6..6daf275 100644 --- a/src/jalview/javascript/JSFunctionExec.java +++ b/src/jalview/javascript/JSFunctionExec.java @@ -1,27 +1,31 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.javascript; +import jalview.bin.JalviewLite; + import java.net.URL; import java.util.Vector; import netscape.javascript.JSObject; -import jalview.bin.JalviewLite; public class JSFunctionExec implements Runnable { @@ -35,7 +39,8 @@ public class JSFunctionExec implements Runnable jvlite.setExecutor(this); } - public void finalize() + @Override + protected void finalize() throws Throwable { jvlite = null; executor = null; @@ -44,6 +49,7 @@ public class JSFunctionExec implements Runnable jsExecQueue.clear(); } jsExecQueue = null; + super.finalize(); } private Vector jsExecQueue; @@ -78,6 +84,7 @@ public class JSFunctionExec implements Runnable executor = null; } + @Override public void run() { while (jsExecQueue != null) @@ -160,6 +167,7 @@ public class JSFunctionExec implements Runnable final Exception[] jsex = new Exception[1]; Runnable exec = new Runnable() { + @Override public void run() { try @@ -192,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");