提交 88b613e9 编写于 作者: J Jesse Glick

[JENKINS-11739] Cannot compile a plugin with a Plugin subclass in the same...

[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.)
上级 b98b5703
......@@ -33,6 +33,7 @@ import javax.annotation.processing.SupportedAnnotationTypes;
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 class PluginSubtypeMarker extends AbstractProcessor {
}
};
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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册