Skip to content

Commit e9416b3

Browse files
committed
Polishing
1 parent cde95e1 commit e9416b3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,8 +42,8 @@ public class MapMethodProcessor implements HandlerMethodArgumentResolver, Handle
4242

4343
@Override
4444
public boolean supportsParameter(MethodParameter parameter) {
45-
return Map.class.isAssignableFrom(parameter.getParameterType()) &&
46-
parameter.getParameterAnnotations().length == 0;
45+
return (Map.class.isAssignableFrom(parameter.getParameterType()) &&
46+
parameter.getParameterAnnotations().length == 0);
4747
}
4848

4949
@Override
@@ -70,8 +70,8 @@ public void handleReturnValue(@Nullable Object returnValue, MethodParameter retu
7070
}
7171
else if (returnValue != null) {
7272
// should not happen
73-
throw new UnsupportedOperationException("Unexpected return type: " +
74-
returnType.getParameterType().getName() + " in method: " + returnType.getMethod());
73+
throw new UnsupportedOperationException("Unexpected return type [" +
74+
returnType.getParameterType().getName() + "] in method: " + returnType.getMethod());
7575
}
7676
}
7777

spring-web/src/main/java/org/springframework/web/method/annotation/ModelMethodProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -70,8 +70,8 @@ else if (returnValue instanceof Model) {
7070
}
7171
else {
7272
// should not happen
73-
throw new UnsupportedOperationException("Unexpected return type: " +
74-
returnType.getParameterType().getName() + " in method: " + returnType.getMethod());
73+
throw new UnsupportedOperationException("Unexpected return type [" +
74+
returnType.getParameterType().getName() + "] in method: " + returnType.getMethod());
7575
}
7676
}
7777

0 commit comments

Comments
 (0)