mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
Fixed excessive warnings when switching themes
This commit is contained in:
@@ -236,11 +236,9 @@ public class ReflectionUtilities {
|
||||
StackTraceElement[] trace = t.getStackTrace();
|
||||
int lastIgnoreIndex = -1;
|
||||
for (int i = 0; i < trace.length; i++) {
|
||||
|
||||
StackTraceElement element = trace[i];
|
||||
String className = element.getClassName();
|
||||
int nameIndex = patterns.indexOf(className);
|
||||
if (nameIndex != -1) {
|
||||
String text = element.getClassName() + " " + element.getMethodName();
|
||||
if (containsAny(text, patterns)) {
|
||||
lastIgnoreIndex = i;
|
||||
}
|
||||
else {
|
||||
@@ -269,6 +267,15 @@ public class ReflectionUtilities {
|
||||
return t;
|
||||
}
|
||||
|
||||
private static boolean containsAny(String text, List<String> patterns) {
|
||||
for (String pattern : patterns) {
|
||||
if (text.contains(pattern)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a throwable whose stack trace is based upon the current call stack, with any
|
||||
* information coming before, and including, the given classes removed.
|
||||
|
||||
Reference in New Issue
Block a user