diff options
author | Marcus Ilgner <mail@marcusilgner.com> | 2023-10-05 15:37:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 16:37:38 +0300 |
commit | 426a0d71ff843e28592ab0bbd989aa7fb274976c (patch) | |
tree | 7bca1a5250aede2edc5a1d5145a30599728fbaaa | |
parent | 4715257de1e0d49fca734698ca417c5e841248c5 (diff) | |
download | pf4j-426a0d71ff843e28592ab0bbd989aa7fb274976c.tar.gz pf4j-426a0d71ff843e28592ab0bbd989aa7fb274976c.zip |
Write empty extensions descriptor even if no extensions are found
-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; } |