Skip to content

Commit 241dfbf

Browse files
committed
Polishing
(cherry picked from commit 9e03e0e)
1 parent bc492b9 commit 241dfbf

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
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: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 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.
@@ -74,9 +74,11 @@
7474
*/
7575
public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver {
7676

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

8183
private final Map<Class<?>, Map<Class<? extends Throwable>, Method>> exceptionHandlerCache =
8284
new ConcurrentHashMap<Class<?>, Map<Class<? extends Throwable>, Method>>(64);
@@ -209,7 +211,7 @@ protected List<Class<? extends Throwable>> getHandledExceptions(Method method) {
209211

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

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 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.
@@ -80,15 +80,17 @@
8080
* @author Arjen Poutsma
8181
* @author Juergen Hoeller
8282
* @since 3.0
83-
*
8483
* @deprecated as of Spring 3.2, in favor of
8584
* {@link org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver ExceptionHandlerExceptionResolver}
8685
*/
8786
@Deprecated
8887
public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver {
8988

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

9395
private final Map<Class<?>, Map<Class<? extends Throwable>, Method>> exceptionHandlerCache =
9496
new ConcurrentHashMap<Class<?>, Map<Class<? extends Throwable>, Method>>(64);
@@ -233,8 +235,8 @@ protected List<Class<? extends Throwable>> getHandledExceptions(Method method) {
233235
}
234236

235237
/**
236-
* Uses the {@link DepthComparator} to find the best matching method
237-
* @return the best matching method or {@code null}.
238+
* Uses the {@link ExceptionDepthComparator} to find the best matching method.
239+
* @return the best matching method, or {@code null} if none found
238240
*/
239241
private Method getBestMatchingMethod(
240242
Map<Class<? extends Throwable>, Method> resolverMethods, Exception thrownException) {

0 commit comments

Comments
 (0)