Some refactoring
This commit is contained in:
parent
cfb18e0584
commit
07b724c0f6
@ -25,27 +25,17 @@
|
|||||||
*/
|
*/
|
||||||
package sesim;
|
package sesim;
|
||||||
|
|
||||||
import gui.Globals;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileFilter;
|
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLClassLoader;
|
import java.net.URLClassLoader;
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
import java.util.jar.JarEntry;
|
import java.util.jar.JarEntry;
|
||||||
import java.util.jar.JarInputStream;
|
import java.util.jar.JarInputStream;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -69,7 +59,7 @@ public class SeSimClassLoader {
|
|||||||
* Create a SeSimClassLoader object with an empty default path
|
* Create a SeSimClassLoader object with an empty default path
|
||||||
*/
|
*/
|
||||||
public SeSimClassLoader() {
|
public SeSimClassLoader() {
|
||||||
this(new ArrayList<String>());
|
this(new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -154,7 +144,7 @@ public class SeSimClassLoader {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
URL url = null;
|
URL url;
|
||||||
try {
|
try {
|
||||||
url = new File(directory).toURI().toURL();
|
url = new File(directory).toURI().toURL();
|
||||||
|
|
||||||
@ -258,6 +248,7 @@ public class SeSimClassLoader {
|
|||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
if (jarstream != null)
|
||||||
jarstream.close();
|
jarstream.close();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
java.util.logging.Logger.getLogger(AutoTraderLoader.class.getName()).log(Level.SEVERE, null, ex);
|
java.util.logging.Logger.getLogger(AutoTraderLoader.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
@ -267,7 +258,7 @@ public class SeSimClassLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// System.exit(0);
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user