Closes gh-48306
@ -244,7 +244,7 @@ public class CommandRunner implements Iterable<Command> {
if (ex instanceof CommandException commandException) {
options = commandException.getOptions();
if (options.contains(CommandException.Option.RETHROW)) {
throw (CommandException) ex;
throw commandException;
}
boolean couldNotShowMessage = false;
@ -138,7 +138,7 @@ class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>> {
else if (value instanceof MergedAnnotation<?> annotation) {
for (Method attribute : annotation.getType().getDeclaredMethods()) {
collectProperties(name, defaultSkip, (MergedAnnotation<?>) value, attribute, properties);
collectProperties(name, defaultSkip, annotation, attribute, properties);
else {