Ghidra is a software reverse engineering (SRE) framework
GP-4844: Fixed ClassSearcher exception when launching from single jar mode (Closes #6809)
Ryan Kurtz8509c3a9e400
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/GhidraJarBuilder.java b/Ghidra/Features/Base/src/main/java/ghidra/util/GhidraJarBuilder.javaindex abca54291e..a19a3ff0ad 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/util/GhidraJarBuilder.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/GhidraJarBuilder.java@@ -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());}}diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/classfinder/ClassSearcher.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/classfinder/ClassSearcher.javaindex 011acf42d7..90b58a63c2 100644--- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/classfinder/ClassSearcher.java+++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/classfinder/ClassSearcher.java@@ -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;