Skip to content
Permalink
Browse files
[JENKINS-11739] Cannot compile a plugin with a Plugin subclass in the…
… same package as a package-info.java.

(Not quite FIXED yet since org.kohsuke.stapler.jsr269 seems to suffer from a similar bug, currently printing ugly warnings.)
  • Loading branch information
jglick committed Aug 1, 2012
1 parent b98b570 commit 88b613e95f6d8991a047f13275179e190e4c7587
Showing with 7 additions and 2 deletions.
  1. +7 −2 core/src/main/java/jenkins/PluginSubtypeMarker.java
@@ -33,6 +33,7 @@
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.TypeMirror;
@@ -81,8 +82,12 @@ public Void visitType(TypeElement e, Void aVoid) {
}
};

for( Element e : roundEnv.getRootElements() )
scanner.scan(e,null);
for (Element e : roundEnv.getRootElements()) {
if (e.getKind() == ElementKind.PACKAGE) { // JENKINS-11739
continue;
}
scanner.scan(e, null);
}

return false;
} catch (RuntimeException e) {

0 comments on commit 88b613e

Please sign in to comment.