mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Fixed excessive warnings when switching themes
This commit is contained in:
parent
23d471731e
commit
86d2bb4dff
5 changed files with 112 additions and 48 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue