-
Notifications
You must be signed in to change notification settings - Fork 446
Closed
Labels
theme: codegenAn issue or change related to the picocli-codegen moduleAn issue or change related to the picocli-codegen moduletype: bug 🐛
Milestone
Description
I set up picocli-codegen as an annotation processor and from that point on build always fails with:
error: FATAL ERROR: java.lang.ClassCastException: class com.sun.tools.javac.code.Attribute$Class cannot be cast to class javax.lang.model.type.TypeMirror (com.sun.tools.javac.code.Attribute$Class is in module jdk.compiler of loader 'app'; javax.lang.model.type.TypeMirror is in module java.compiler of loader 'platform')
at picocli.codegen.annotation.processing.CompletionCandidatesMetaData.extract(CompletionCandidatesMetaData.java:44)
at picocli.codegen.annotation.processing.AbstractCommandSpecProcessor.buildOption(AbstractCommandSpecProcessor.java:499).
Where the related code looks like:
public static class LevelCompletion extends ArrayList<String> {
public LevelCompletion() {
super(Arrays.asList("OFF", "INFO", "WARN", ));
}
}
@CommandLine.Option(names = "--level",
description = "Level.",
defaultValue = "OFF",
showDefaultValue = CommandLine.Help.Visibility.ALWAYS,
completionCandidates = LevelCompletion.class)
private Level level;
Am I doing something wrong or is it bug?
Metadata
Metadata
Assignees
Labels
theme: codegenAn issue or change related to the picocli-codegen moduleAn issue or change related to the picocli-codegen moduletype: bug 🐛