Tiny improvements regarding ArrayList creation
Closes gh-23047
This commit is contained in:
committed by
Sam Brannen
parent
f492e37370
commit
7ef8cc9faf
@@ -56,8 +56,7 @@ public class AnnotationExceptionHandlerMethodResolver extends AbstractExceptionH
|
||||
Map<Class<? extends Throwable>, Method> result = new HashMap<>();
|
||||
for (Map.Entry<Method, MessageExceptionHandler> entry : methods.entrySet()) {
|
||||
Method method = entry.getKey();
|
||||
List<Class<? extends Throwable>> exceptionTypes = new ArrayList<>();
|
||||
exceptionTypes.addAll(Arrays.asList(entry.getValue().value()));
|
||||
List<Class<? extends Throwable>> exceptionTypes = new ArrayList<>(Arrays.asList(entry.getValue().value()));
|
||||
if (exceptionTypes.isEmpty()) {
|
||||
exceptionTypes.addAll(getExceptionsFromMethodSignature(method));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user