Преглед на файлове

Improve annotation processor error messages (#370)

tags/release-3.3.0
GunoH преди 4 години
родител
ревизия
c10e9bc60c
No account linked to committer's email address
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4
    2
      pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java

+ 4
- 2
pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java Целия файл

@@ -239,11 +239,13 @@ public class ExtensionAnnotationProcessor extends AbstractProcessor {
// pickup the first interface
if (extensionPointElements.isEmpty() && ignoreExtensionPoint) {
if (interfaces.isEmpty()) {
error(extensionElement, "%s is not an extension (it doesn't implement any interface)", extensionElement);
error(extensionElement, "Cannot use %s as extension point with %s compiler arg (it doesn't implement any interface)",
extensionElement, IGNORE_EXTENSION_POINT);
} else if (interfaces.size() == 1) {
extensionPointElements.add(getElement(interfaces.get(0)));
} else {
error(extensionElement, "%s is not an extension (it implements multiple interfaces)", extensionElement);
error(extensionElement, "Cannot use %s as extension point with %s compiler arg (it implements multiple interfaces)",
extensionElement, IGNORE_EXTENSION_POINT);
}
}
}

Loading…
Отказ
Запис