< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java
Print this page
@@ -172,11 +172,11 @@
processingEnv.getMessager().printMessage(Kind.ERROR, "Unexpected enclosing element kind: " + enclosing.getKind(), element);
return;
}
enclosing = enclosing.getEnclosingElement();
}
- if (enclosingPackage == null) {
+ if (enclosingPackage == null || enclosingPackage.isUnnamed()) {
processingEnv.getMessager().printMessage(Kind.ERROR, "Option field cannot be declared in the unnamed package", element);
return;
}
List<String> helpValue = getAnnotationValueList(annotation, "help", String.class);
String help = "";
< prev index next >