Skip to content

Commit

Permalink
Earlier/LaterSubtypes supports only built-in supertypes (#215) (#223)
Browse files Browse the repository at this point in the history
This lets the PluginLoader load the supertype with the plugin's
class loader, not the class loader that loaded the SpotBugs core.
  • Loading branch information
Andreas Sewe authored and henrik242 committed Jun 28, 2017
1 parent d90a993 commit fddcc5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spotbugs/src/main/java/edu/umd/cs/findbugs/PluginLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ private static Date parseDate(String releaseDate) {
}
}

private static DetectorFactorySelector getConstraintSelector(Element constraintElement, Plugin plugin,
private DetectorFactorySelector getConstraintSelector(Element constraintElement, Plugin plugin,
String singleDetectorElementName/*
* , String
* detectorCategoryElementName
Expand Down Expand Up @@ -1305,7 +1305,7 @@ private static DetectorFactorySelector getConstraintSelector(Element constraintE
String superName = node.valueOf("@super");
if (!"".equals(superName)) {
try {
Class<?> superClass = Class.forName(superName);
Class<?> superClass = Class.forName(superName, true, classLoader);
return new ByInterfaceDetectorFactorySelector(spanPlugins ? null : plugin, superClass);
} catch (ClassNotFoundException e) {
throw new PluginException("Unknown class " + superName + " in constraint selector node");
Expand Down

0 comments on commit fddcc5e

Please sign in to comment.