mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-13 22:01:04 -04:00
Java 11.0.2 migration (#32)
* Code compiles - execution NOT tested * updating gitignore * Removed intellij settings files * Removed more intellij files * Added exclusion for JDK classes. * Fixed purchasing script for vendors that have listed coin types. * Updated script to not kick off until the entire preload is complete. * adds static name entry for Solo movie poster and tcg9 vendor entry * clean up empty and orphaned object templates * adds placeholder black market (static) spawns * corrects entries for the video game table to correctly set it in tcg series 2 and remove series 1 console errors * Updated gitignore and removed intellij project files * Fixed appearance reference for thranta payroll and kashyyyk door, added skipLosCheck objvar due to cannit see issue. Requires updated src * Fixed appearance and template for terminal (#2) * Fixed appearance and template for terminal (#3) * Fixed appearance and template for terminal (#4) * Deleted another faulty/orphaned object template * Fixed gcw ranks option on frog. Only issue is that it doesn't award the officer commands or badges. * Fixed some unneeded java 11 changes
This commit is contained in:
@@ -9,6 +9,7 @@ import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
@@ -53,19 +54,17 @@ public class script_class_loader extends ClassLoader
|
||||
{
|
||||
try
|
||||
{
|
||||
myObject = myClass.newInstance();
|
||||
myObject = myClass.getDeclaredConstructor().newInstance();
|
||||
if (myObject == null)
|
||||
{
|
||||
System.err.println("WARNING: Java Error creating object for class " + name);
|
||||
}
|
||||
}
|
||||
catch ( InstantiationException err )
|
||||
catch ( InstantiationException | IllegalAccessException err )
|
||||
{
|
||||
System.err.println("WARNING: Java Error creating class instance " + name + " : " + err);
|
||||
}
|
||||
catch ( IllegalAccessException err )
|
||||
{
|
||||
System.err.println("WARNING: Java Error creating class instance " + name + " : " + err);
|
||||
} catch (NoSuchMethodException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -84,7 +83,7 @@ public class script_class_loader extends ClassLoader
|
||||
if (test != null)
|
||||
return (script_class_loader)test;
|
||||
|
||||
if (name.indexOf("script.") != 0)
|
||||
if (!name.startsWith("script."))
|
||||
{
|
||||
ClassNotFoundException err = new ClassNotFoundException("Class " + name + " does not start with 'script.'");
|
||||
err.printStackTrace();
|
||||
@@ -210,9 +209,10 @@ public class script_class_loader extends ClassLoader
|
||||
{
|
||||
// filter out classes that will be loaded by the default loader
|
||||
int nameLength = name.length();
|
||||
if ((nameLength > 5 && name.substring(0, 5).compareTo("java.") == 0) ||
|
||||
(nameLength > 4 && name.substring(0, 4).compareTo("sun.") == 0) ||
|
||||
(nameLength > 10 && name.substring(0, 10).compareTo("intuitive.") == 0) ||
|
||||
if ((nameLength > 5 && name.startsWith("java.")) ||
|
||||
(nameLength > 4 && name.startsWith("sun.")) ||
|
||||
(nameLength > 10 && name.startsWith("intuitive.")) ||
|
||||
(nameLength > 4 && name.startsWith("jdk.")) ||
|
||||
defaultLoad.contains(name))
|
||||
{
|
||||
Class cls = super.loadClass(name, resolve);
|
||||
|
||||
Reference in New Issue
Block a user