Made 508 run without reflection, sound and all.
This commit is contained in:
parent
1937cd9b59
commit
a26bc1d519
|
@ -30,8 +30,8 @@ public class Class120
|
||||||
return null;
|
return null;
|
||||||
if ((is.length ^ 0xffffffff) < -137 && !Class104.aBoolean1780) {
|
if ((is.length ^ 0xffffffff) < -137 && !Class104.aBoolean1780) {
|
||||||
try {
|
try {
|
||||||
Class15 class15
|
//xxx Class15 class15 = (Class15) Class.forName("Class15_Sub1").newInstance();
|
||||||
= (Class15) Class.forName("Class15_Sub1").newInstance();
|
Class15 class15 = new Class15_Sub1();
|
||||||
class15.method277(is, true);
|
class15.method277(is, true);
|
||||||
return class15;
|
return class15;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
|
|
|
@ -167,8 +167,8 @@ public class Class28
|
||||||
int i_15_) {
|
int i_15_) {
|
||||||
anInt527++;
|
anInt527++;
|
||||||
try {
|
try {
|
||||||
Class var_class = Class.forName("Class72_Sub2");
|
//xxx Class72 class72 = (Class72) Class.forName("Class72_Sub2").newInstance();
|
||||||
Class72 class72 = (Class72) var_class.newInstance();
|
Class72 class72 = new Class72_Sub2();
|
||||||
if (i_15_ >= -12)
|
if (i_15_ >= -12)
|
||||||
method393(-53, false);
|
method393(-53, false);
|
||||||
class72.method1356(component, i, -121, i_14_);
|
class72.method1356(component, i, -121, i_14_);
|
||||||
|
|
|
@ -75,8 +75,8 @@ public class Class55
|
||||||
if ((i_2_ ^ 0xffffffff) > -257)
|
if ((i_2_ ^ 0xffffffff) > -257)
|
||||||
i_2_ = 256;
|
i_2_ = 256;
|
||||||
try {
|
try {
|
||||||
Class35 class35
|
//xxx Class35 class35 = (Class35) Class.forName("Class35_Sub2").newInstance();
|
||||||
= (Class35) Class.forName("Class35_Sub2").newInstance();
|
Class35 class35 = new Class35_Sub2();
|
||||||
class35.anIntArray625
|
class35.anIntArray625
|
||||||
= new int[256 * (Class7.aBoolean132 ? 2 : 1)];
|
= new int[256 * (Class7.aBoolean132 ? 2 : 1)];
|
||||||
class35.anInt632 = i_2_;
|
class35.anInt632 = i_2_;
|
||||||
|
|
|
@ -108,7 +108,8 @@ public class Class68_Sub20_Sub2 extends Class68_Sub20
|
||||||
try {
|
try {
|
||||||
if (i < 56)
|
if (i < 56)
|
||||||
return null;
|
return null;
|
||||||
return (Class97) Class.forName("Class97_Sub1").newInstance();
|
//xxx return (Class97) Class.forName("Class97_Sub1").newInstance();
|
||||||
|
return new Class97_Sub1();
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,8 @@ public class Class68_Sub20_Sub3 extends Class68_Sub20
|
||||||
if (i != 3253)
|
if (i != 3253)
|
||||||
method1056(-92);
|
method1056(-92);
|
||||||
try {
|
try {
|
||||||
return (Class105) Class.forName("Class105_Sub1").newInstance();
|
//xxx return (Class105) Class.forName("Class105_Sub1").newInstance();
|
||||||
|
return new Class105_Sub1();
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,8 @@ public abstract class Class72
|
||||||
method1349(null, false);
|
method1349(null, false);
|
||||||
anInt1301++;
|
anInt1301++;
|
||||||
try {
|
try {
|
||||||
return (Class50) Class.forName("Class50_Sub1").newInstance();
|
//return (Class50) Class.forName("Class50_Sub1").newInstance();
|
||||||
|
return new Class50_Sub1();
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
return new Class50_Sub2();
|
return new Class50_Sub2();
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,8 @@ abstract class Class72
|
||||||
anInt1301++;
|
anInt1301++;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return (Class50) Class.forName("Class50_Sub1").newInstance();
|
//xxx return (Class50) Class.forName("Class50_Sub1").newInstance();
|
||||||
|
return new Class50_Sub1();
|
||||||
} catch (Throwable throwable)
|
} catch (Throwable throwable)
|
||||||
{
|
{
|
||||||
return new Class50_Sub2();
|
return new Class50_Sub2();
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class SecurityManager extends java.lang.SecurityManager {
|
||||||
throw new NullPointerException("Permission cannot be null.");
|
throw new NullPointerException("Permission cannot be null.");
|
||||||
|
|
||||||
// this isn't ready to go live yet, so just return and allow it all
|
// this isn't ready to go live yet, so just return and allow it all
|
||||||
if(true) return;
|
//if(true) return;
|
||||||
|
|
||||||
// we are now going to go through the ClassLoaders of all Classes on the stack
|
// we are now going to go through the ClassLoaders of all Classes on the stack
|
||||||
// if any of them are in perms, then check the permissions, sticking to the most
|
// if any of them are in perms, then check the permissions, sticking to the most
|
||||||
|
@ -76,7 +76,7 @@ public class SecurityManager extends java.lang.SecurityManager {
|
||||||
if (lastCName.startsWith("java.util.") && lastCName.endsWith("Calendar") && (perm.equals(p1) || perm.equals(reflectPerm)) )
|
if (lastCName.startsWith("java.util.") && lastCName.endsWith("Calendar") && (perm.equals(p1) || perm.equals(reflectPerm)) )
|
||||||
return;
|
return;
|
||||||
// some more exceptions for when java classes use reflection. why?...
|
// some more exceptions for when java classes use reflection. why?...
|
||||||
if(lastCName.equals("java.awt.Component") && perm.equals(reflectPerm))
|
if((lastCName.equals("java.awt.Component") || lastCName.equals("javax.sound.sampled.AudioSystem")) && perm.equals(reflectPerm))
|
||||||
return;
|
return;
|
||||||
// it must be in our map, so update allow appropriatly
|
// it must be in our map, so update allow appropriatly
|
||||||
allow &= clPerms.implies(perm);
|
allow &= clPerms.implies(perm);
|
||||||
|
@ -89,8 +89,8 @@ public class SecurityManager extends java.lang.SecurityManager {
|
||||||
System.out.println("denying: " + perm.toString());
|
System.out.println("denying: " + perm.toString());
|
||||||
|
|
||||||
// class stack for debugging
|
// class stack for debugging
|
||||||
//for (int i = 1; i < c.length; i++) System.out.println(i + ": " + c[i].getName());
|
for (int i = 1; i < c.length; i++) System.out.println(i + ": " + c[i].getName());
|
||||||
Thread.dumpStack();
|
//Thread.dumpStack();
|
||||||
|
|
||||||
// otherwise allow is false, throw a SecurityException
|
// otherwise allow is false, throw a SecurityException
|
||||||
throw new SecurityException("Permission denied: "+perm.toString());
|
throw new SecurityException("Permission denied: "+perm.toString());
|
||||||
|
|
Loading…
Reference in New Issue