Skip to content

Commit 9e03e0e

Browse files
committed
Polishing
1 parent b880b4a commit 9e03e0e

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

spring-orm/src/main/java/org/springframework/orm/hibernate3/support/IdTransferringMergeEventListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* @since 1.2
5050
* @see org.springframework.orm.hibernate3.LocalSessionFactoryBean#setEventListeners(java.util.Map)
5151
*/
52-
@SuppressWarnings({ "serial", "rawtypes", "deprecation" })
52+
@SuppressWarnings({"serial", "rawtypes", "deprecation"})
5353
public class IdTransferringMergeEventListener extends DefaultMergeEventListener {
5454

5555
/**

spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@
7575
*/
7676
public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver {
7777

78-
// dummy method placeholder
79-
private static final Method NO_METHOD_FOUND =
80-
ClassUtils.getMethodIfAvailable(System.class, "currentTimeMillis", (Class<?>[]) null);
78+
/**
79+
* Arbitrary {@link Method} reference, indicating no method found in the cache.
80+
*/
81+
private static final Method NO_METHOD_FOUND = ClassUtils.getMethodIfAvailable(System.class, "currentTimeMillis");
82+
8183

8284
private final Map<Class<?>, Map<Class<? extends Throwable>, Method>> exceptionHandlerCache =
8385
new ConcurrentHashMap<Class<?>, Map<Class<? extends Throwable>, Method>>(64);
@@ -210,7 +212,7 @@ protected List<Class<? extends Throwable>> getHandledExceptions(Method method) {
210212

211213
/**
212214
* Uses the {@link ExceptionDepthComparator} to find the best matching method.
213-
* @return the best matching method or {@code null}.
215+
* @return the best matching method, or {@code null} if none found
214216
*/
215217
private Method getBestMatchingMethod(
216218
Map<Class<? extends Throwable>, Method> resolverMethods, Exception thrownException) {

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@
8888
@Deprecated
8989
public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver {
9090

91-
// dummy method placeholder
92-
private static final Method NO_METHOD_FOUND = ClassUtils.getMethodIfAvailable(System.class, "currentTimeMillis", (Class<?>[]) null);
91+
/**
92+
* Arbitrary {@link Method} reference, indicating no method found in the cache.
93+
*/
94+
private static final Method NO_METHOD_FOUND = ClassUtils.getMethodIfAvailable(System.class, "currentTimeMillis");
95+
9396

9497
private final Map<Class<?>, Map<Class<? extends Throwable>, Method>> exceptionHandlerCache =
9598
new ConcurrentHashMap<Class<?>, Map<Class<? extends Throwable>, Method>>(64);
@@ -234,8 +237,8 @@ protected List<Class<? extends Throwable>> getHandledExceptions(Method method) {
234237
}
235238

236239
/**
237-
* Uses the {@link DepthComparator} to find the best matching method
238-
* @return the best matching method or {@code null}.
240+
* Uses the {@link ExceptionDepthComparator} to find the best matching method.
241+
* @return the best matching method, or {@code null} if none found
239242
*/
240243
private Method getBestMatchingMethod(
241244
Map<Class<? extends Throwable>, Method> resolverMethods, Exception thrownException) {

0 commit comments

Comments
 (0)