mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-26 11:39:14 +00:00
Remove unnecessary cast
Replace explicit casts with pattern variables to improve readability and remove redundancy. See gh-48297 Signed-off-by: geopark021 <geobrown021@gmail.com>
This commit is contained in:
committed by
Stéphane Nicoll
parent
710e567ba5
commit
6b60d89b28
+1
-1
@@ -138,7 +138,7 @@ public 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 {
|
||||
|
||||
+1
-1
@@ -242,7 +242,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;
|
||||
|
||||
Reference in New Issue
Block a user