Polishing

This commit is contained in:
Juergen Hoeller 2015-12-15 11:53:40 +01:00
parent b880b4a545
commit 9e03e0e73d
3 changed files with 14 additions and 9 deletions

View File

@ -49,7 +49,7 @@ import org.hibernate.persister.entity.EntityPersister;
* @since 1.2 * @since 1.2
* @see org.springframework.orm.hibernate3.LocalSessionFactoryBean#setEventListeners(java.util.Map) * @see org.springframework.orm.hibernate3.LocalSessionFactoryBean#setEventListeners(java.util.Map)
*/ */
@SuppressWarnings({ "serial", "rawtypes", "deprecation" }) @SuppressWarnings({"serial", "rawtypes", "deprecation"})
public class IdTransferringMergeEventListener extends DefaultMergeEventListener { public class IdTransferringMergeEventListener extends DefaultMergeEventListener {
/** /**

View File

@ -75,9 +75,11 @@ import org.springframework.web.servlet.View;
*/ */
public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver { public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver {
// dummy method placeholder /**
private static final Method NO_METHOD_FOUND = * Arbitrary {@link Method} reference, indicating no method found in the cache.
ClassUtils.getMethodIfAvailable(System.class, "currentTimeMillis", (Class<?>[]) null); */
private static final Method NO_METHOD_FOUND = ClassUtils.getMethodIfAvailable(System.class, "currentTimeMillis");
private final Map<Class<?>, Map<Class<? extends Throwable>, Method>> exceptionHandlerCache = private final Map<Class<?>, Map<Class<? extends Throwable>, Method>> exceptionHandlerCache =
new ConcurrentHashMap<Class<?>, Map<Class<? extends Throwable>, Method>>(64); new ConcurrentHashMap<Class<?>, Map<Class<? extends Throwable>, Method>>(64);
@ -210,7 +212,7 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc
/** /**
* Uses the {@link ExceptionDepthComparator} to find the best matching method. * Uses the {@link ExceptionDepthComparator} to find the best matching method.
* @return the best matching method or {@code null}. * @return the best matching method, or {@code null} if none found
*/ */
private Method getBestMatchingMethod( private Method getBestMatchingMethod(
Map<Class<? extends Throwable>, Method> resolverMethods, Exception thrownException) { Map<Class<? extends Throwable>, Method> resolverMethods, Exception thrownException) {

View File

@ -88,8 +88,11 @@ import org.springframework.web.servlet.support.RequestContextUtils;
@Deprecated @Deprecated
public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver { public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExceptionResolver {
// dummy method placeholder /**
private static final Method NO_METHOD_FOUND = ClassUtils.getMethodIfAvailable(System.class, "currentTimeMillis", (Class<?>[]) null); * Arbitrary {@link Method} reference, indicating no method found in the cache.
*/
private static final Method NO_METHOD_FOUND = ClassUtils.getMethodIfAvailable(System.class, "currentTimeMillis");
private final Map<Class<?>, Map<Class<? extends Throwable>, Method>> exceptionHandlerCache = private final Map<Class<?>, Map<Class<? extends Throwable>, Method>> exceptionHandlerCache =
new ConcurrentHashMap<Class<?>, Map<Class<? extends Throwable>, Method>>(64); new ConcurrentHashMap<Class<?>, Map<Class<? extends Throwable>, Method>>(64);
@ -234,8 +237,8 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc
} }
/** /**
* Uses the {@link DepthComparator} to find the best matching method * Uses the {@link ExceptionDepthComparator} to find the best matching method.
* @return the best matching method or {@code null}. * @return the best matching method, or {@code null} if none found
*/ */
private Method getBestMatchingMethod( private Method getBestMatchingMethod(
Map<Class<? extends Throwable>, Method> resolverMethods, Exception thrownException) { Map<Class<? extends Throwable>, Method> resolverMethods, Exception thrownException) {