GP-4844: Fixed ClassSearcher exception when launching from single jar

mode (Closes #6809)
This commit is contained in:
Ryan Kurtz 2024-08-13 09:16:59 -04:00
parent 22d967553d
commit 8509c3a9e4
2 changed files with 6 additions and 6 deletions

View File

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -621,7 +621,7 @@ public class GhidraJarBuilder implements GhidraLaunchable {
if (clazz == null) {
System.out.println("Couldn't load " + path);
}
else if (ClassSearcher.isClassOfInterest(clazz)) {
else {
extensionPointClasses.add(clazz.getName());
}
}

View File

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -176,7 +176,7 @@ public class ClassSearcher {
}
List<Class<? extends T>> list = new ArrayList<>();
for (ClassFileInfo info : extensionPointSuffixToInfoMap.get(suffix)) {
for (ClassFileInfo info : extensionPointSuffixToInfoMap.getOrDefault(suffix, Set.of())) {
if (falsePositiveCache.contains(info)) {
continue;