diff options
-rw-r--r-- | pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java b/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java index 66293f8..582414b 100644 --- a/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java +++ b/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java @@ -130,10 +130,10 @@ public class ExtensionAnnotationProcessor extends AbstractProcessor { } } - // write extensions - if (extensions.size() > 0) { - storage.write(extensions); - } + // Even an empty extensions descriptor is semantically correct and should be + // written to prevent classloaders from falling back to extension descriptor + // resources from dependencies of the plugin being processed. + storage.write(extensions); return false; } |