You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class ErrorPronePlugins {
public static ScannerSupplier loadPlugins(ScannerSupplier scannerSupplier, Context context) {
JavaFileManager fileManager = context.get(JavaFileManager.class);
// Unlike in annotation processor discovery, we never search CLASS_PATH if
// ANNOTATION_PROCESSOR_PATH is unavailable.
if (!fileManager.hasLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH)) {
return scannerSupplier;
}
// Use the same classloader that Error Prone was loaded from to avoid classloader skew
// when using Error Prone plugins together with the Error Prone javac plugin.
JavacProcessingEnvironment processingEnvironment = JavacProcessingEnvironment.instance(context);
ClassLoader loader = processingEnvironment.getProcessorClassLoader();
Iterable<BugChecker> extraBugCheckers = ServiceLoader.load(BugChecker.class, loader);
if (Iterables.isEmpty(extraBugCheckers)) {
return scannerSupplier;
}
return scannerSupplier.plus(
ScannerSupplier.fromBugCheckerClasses(
Iterables.transform(extraBugCheckers, BugChecker::getClass)));
}
}
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
maven note: Classpath elements to supply as annotation processor path. If specified, the compiler will detect annotation processors only in those classpath elements. If omitted, the default classpath is used to detect annotation processors. The detection itself depends on the configuration of annotationProcessors.
ErrorPronePlugins broke this specification of maven-compiler-plugin, please resolve this conflict issue about this code.
The text was updated successfully, but these errors were encountered:
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
maven note: Classpath elements to supply as annotation processor path. If specified, the compiler will detect annotation processors only in those classpath elements. If omitted, the default classpath is used to detect annotation processors. The detection itself depends on the configuration of annotationProcessors.
ErrorPronePlugins broke this specification of maven-compiler-plugin, please resolve this conflict issue about this code.
The text was updated successfully, but these errors were encountered: