Skip to content

Commit 339c57e

Browse files
committed
polishing
1 parent 37c601c commit 339c57e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

org.springframework.core/src/main/java/org/springframework/core/GenericTypeResolver.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,20 @@ public static Class<?> resolveReturnType(Method method, Class clazz) {
116116
public static Class<?> resolveReturnTypeArgument(Method method, Class<?> genericIfc) {
117117
Type returnType = method.getReturnType();
118118
Type genericReturnType = method.getGenericReturnType();
119-
ParameterizedType targetType;
120119
if (returnType.equals(genericIfc)) {
121120
if (genericReturnType instanceof ParameterizedType) {
122-
targetType = (ParameterizedType)genericReturnType;
121+
ParameterizedType targetType = (ParameterizedType) genericReturnType;
123122
Type[] actualTypeArguments = targetType.getActualTypeArguments();
124123
Type typeArg = actualTypeArguments[0];
125124
if (!(typeArg instanceof WildcardType)) {
126-
return (Class<?>)typeArg;
125+
return (Class<?>) typeArg;
127126
}
128127
}
129128
else {
130129
return null;
131130
}
132131
}
133-
return GenericTypeResolver.resolveTypeArgument((Class<?>)returnType, genericIfc);
132+
return GenericTypeResolver.resolveTypeArgument((Class<?>) returnType, genericIfc);
134133
}
135134

136135
/**

org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2010 the original author or authors.
2+
* Copyright 2002-2011 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.
@@ -128,8 +128,8 @@ public void setAnnotatedPackages(String[] annotatedPackages) {
128128
}
129129

130130
/**
131-
* Set whether to use Spring-based scanning for entity classes in the classpath
132-
* instead of listing annotated classes explicitly.
131+
* Specify packages to search using Spring-based scanning for entity classes in
132+
* the classpath. This is an alternative to listing annotated classes explicitly.
133133
* <p>Default is none. Specify packages to search for autodetection of your entity
134134
* classes in the classpath. This is analogous to Spring's component-scan feature
135135
* ({@link org.springframework.context.annotation.ClassPathBeanDefinitionScanner}).

0 commit comments

Comments
 (0)