JAL-1688 compiler warnings removed
[jalview.git] / src / jalview / bin / Jalview.java
index 5bb5e98..0fe1664 100755 (executable)
  */
 package jalview.bin;
 
-import jalview.gui.AlignFrame;
-import jalview.gui.Desktop;
-import jalview.io.HtmlSvgOutput;
-import jalview.util.MessageManager;
-import jalview.util.Platform;
-import jalview.ws.jws2.Jws2Discoverer;
-
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.BufferedReader;
@@ -45,13 +38,20 @@ import java.security.CodeSource;
 import java.security.PermissionCollection;
 import java.security.Permissions;
 import java.security.Policy;
-import java.util.Hashtable;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Vector;
 
 import javax.swing.UIManager;
 import javax.swing.UnsupportedLookAndFeelException;
 
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.io.HtmlSvgOutput;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+import jalview.ws.jws2.Jws2Discoverer;
+
 /**
  * Main class for Jalview Application <br>
  * <br>
@@ -820,7 +820,7 @@ public class Jalview
        * = new Binding(); binding.setVariable("input", "world");
        * gse.run("hello.groovy", binding); </code>
        */
-      Class[] bspec;
+      Class<?>[] bspec;
       Object[] binding;
       int blen = ((jalviewContext[0] == null) ? 0 : 1)
               + ((jalviewContext[1] == null) ? 0 : 1);
@@ -830,7 +830,7 @@ public class Jalview
       binding = new Object[blen * 2];
       blen = 0;
       ClassLoader cl = null;
-      Map vbinding = new Hashtable();
+      Map<String, Object> vbinding = new HashMap<String, Object>();
       for (int jc = 0; jc < jalviewContext.length; jc++)
       {
         if (jalviewContext[jc] != null)
@@ -847,8 +847,8 @@ public class Jalview
           blen++;
         }
       }
-      Class gbindingc = cl.loadClass("groovy.lang.Binding");
-      Constructor gbcons;
+      Class<?> gbindingc = cl.loadClass("groovy.lang.Binding");
+      Constructor<?> gbcons;
       Object gbinding;
       try
       {
@@ -858,15 +858,15 @@ public class Jalview
       {
         // old style binding config - using series of string/object values to
         // setVariable.
-        gbcons = gbindingc.getConstructor(null);
-        gbinding = gbcons.newInstance(null);
+        gbcons = gbindingc.getConstructor();
+        gbinding = gbcons.newInstance();
         java.lang.reflect.Method setvar = gbindingc.getMethod(
                 "setVariable", bspec);
         setvar.invoke(gbinding, binding);
       }
-      ;
-      Class gsec = cl.loadClass("groovy.util.GroovyScriptEngine");
-      Constructor gseccons = gsec.getConstructor(new Class[]
+
+      Class<?> gsec = cl.loadClass("groovy.util.GroovyScriptEngine");
+      Constructor<?> gseccons = gsec.getConstructor(new Class[]
       { URL[].class }); // String[].class });
       Object gse = gseccons.newInstance(new Object[]
       { new URL[]
@@ -966,7 +966,7 @@ public class Jalview
   private static FeatureFetcher startFeatureFetching(final Vector dasSources)
   {
     FeatureFetcher ff = new FeatureFetcher();
-    AlignFrame afs[] = Desktop.getAlignframes();
+    AlignFrame afs[] = Desktop.getAlignFrames();
     if (afs == null || afs.length == 0)
     {
       return null;