mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-06 16:50:39 +00:00
@@ -125,6 +125,14 @@ public class ClassRedirect {
|
|||||||
return c.getResourceAsStream(res);
|
return c.getResourceAsStream(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean desiredAssertionStatus(Class<?> c) {
|
||||||
|
if (validStack()) {
|
||||||
|
return c.desiredAssertionStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
return !c.getName().contains("parabot") && c.desiredAssertionStatus();
|
||||||
|
}
|
||||||
|
|
||||||
private static boolean validStack() {
|
private static boolean validStack() {
|
||||||
Exception e = new Exception();
|
Exception e = new Exception();
|
||||||
for (StackTraceElement elem : e.getStackTrace()) {
|
for (StackTraceElement elem : e.getStackTrace()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user