Skip to content

Commit

Permalink
[JENKINS-11739] Cannot compile a plugin with a Plugin subclass in the…
Browse files Browse the repository at this point in the history
… 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 88b613e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/src/main/java/jenkins/PluginSubtypeMarker.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 88b613e

Please sign in to comment.