diff --git a/org.springframework.core/src/main/java/org/springframework/core/GenericTypeResolver.java b/org.springframework.core/src/main/java/org/springframework/core/GenericTypeResolver.java index 25b1d37b29..59afdc4e7d 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/GenericTypeResolver.java +++ b/org.springframework.core/src/main/java/org/springframework/core/GenericTypeResolver.java @@ -116,21 +116,20 @@ public abstract class GenericTypeResolver { public static Class resolveReturnTypeArgument(Method method, Class genericIfc) { Type returnType = method.getReturnType(); Type genericReturnType = method.getGenericReturnType(); - ParameterizedType targetType; if (returnType.equals(genericIfc)) { if (genericReturnType instanceof ParameterizedType) { - targetType = (ParameterizedType)genericReturnType; + ParameterizedType targetType = (ParameterizedType) genericReturnType; Type[] actualTypeArguments = targetType.getActualTypeArguments(); Type typeArg = actualTypeArguments[0]; if (!(typeArg instanceof WildcardType)) { - return (Class)typeArg; + return (Class) typeArg; } } else { return null; } } - return GenericTypeResolver.resolveTypeArgument((Class)returnType, genericIfc); + return GenericTypeResolver.resolveTypeArgument((Class) returnType, genericIfc); } /** diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java index a4649337ac..3264e821ce 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -128,8 +128,8 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem } /** - * Set whether to use Spring-based scanning for entity classes in the classpath - * instead of listing annotated classes explicitly. + * Specify packages to search using Spring-based scanning for entity classes in + * the classpath. This is an alternative to listing annotated classes explicitly. *

Default is none. Specify packages to search for autodetection of your entity * classes in the classpath. This is analogous to Spring's component-scan feature * ({@link org.springframework.context.annotation.ClassPathBeanDefinitionScanner}).