Fix compiler warnings with and without Copilot
This commit is contained in:
parent
3f2bf9c3dc
commit
233886c433
36 changed files with 464 additions and 514 deletions
|
@ -41,8 +41,8 @@ public class Commandline {
|
|||
ClassLoader loader = Main.createClassLoader(installDir);
|
||||
|
||||
// get the main server class
|
||||
Class clazz = loader.loadClass("helma.main.CommandlineRunner");
|
||||
Class[] cargs = new Class[]{args.getClass()};
|
||||
Class<?> clazz = loader.loadClass("helma.main.CommandlineRunner");
|
||||
Class<?>[] cargs = new Class<?>[]{args.getClass()};
|
||||
Method main = clazz.getMethod("main", cargs);
|
||||
Object[] nargs = new Object[]{args};
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@ import java.util.ArrayList;
|
|||
* be able to set up class and install paths.
|
||||
*/
|
||||
public class Main {
|
||||
private Class serverClass;
|
||||
private Class<?> serverClass;
|
||||
private Object server;
|
||||
|
||||
private static final Class[] EMPTY_CLASS_ARRAY = new Class[0];
|
||||
private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
|
||||
private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ public class Main {
|
|||
ClassLoader loader = createClassLoader(installDir);
|
||||
// get the main server class
|
||||
serverClass = loader.loadClass("helma.main.Server");
|
||||
Class[] cargs = new Class[]{args.getClass()};
|
||||
Class<?>[] cargs = new Class<?>[]{args.getClass()};
|
||||
Method loadServer = serverClass.getMethod("loadServer", cargs);
|
||||
Object[] nargs = new Object[]{args};
|
||||
// and invoke the static loadServer(String[]) method
|
||||
|
@ -111,7 +111,7 @@ public class Main {
|
|||
}
|
||||
}
|
||||
|
||||
static void addJars(ArrayList jarlist, File dir) throws MalformedURLException {
|
||||
static void addJars(ArrayList<URL> jarlist, File dir) throws MalformedURLException {
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
String n = name.toLowerCase();
|
||||
|
@ -143,7 +143,7 @@ public class Main {
|
|||
|
||||
// set up the class path
|
||||
File libdir = new File(installDir, "lib");
|
||||
ArrayList jarlist = new ArrayList();
|
||||
ArrayList<URL> jarlist = new ArrayList<>();
|
||||
|
||||
// add all jar files from the lib directory
|
||||
addJars(jarlist, libdir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue