Browse Source

Polishing

(cherry picked from commit 9e925aa)
pull/763/merge
Juergen Hoeller 10 years ago
parent
commit
00147379f9
  1. 2
      spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java
  2. 2
      spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataProviderFactory.java
  3. 2
      spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProviderFactory.java
  4. 1
      spring-web/src/test/java/org/springframework/http/ResponseEntityTests.java
  5. 3
      spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java

2
spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java

@ -90,7 +90,7 @@ public class GenericTypeResolverTests { @@ -90,7 +90,7 @@ public class GenericTypeResolverTests {
resolveType(intArrMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>()));
Method genericArrMessageMethod = findMethod(MySimpleTypeWithMethods.class, "readGenericArrayInputMessage",
Object[].class);
Object[].class);
MethodParameter genericArrMessageMethodParam = new MethodParameter(genericArrMessageMethod, 0);
Map<TypeVariable, Type> varMap = getTypeVariableMap(MySimpleTypeWithMethods.class);
assertEquals(Integer[].class, resolveType(genericArrMessageMethodParam.getGenericParameterType(), varMap));

2
spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataProviderFactory.java

@ -32,7 +32,7 @@ import org.springframework.jdbc.support.MetaDataAccessException; @@ -32,7 +32,7 @@ import org.springframework.jdbc.support.MetaDataAccessException;
/**
* Factory used to create a {@link CallMetaDataProvider} implementation
* based on the type of databse being used.
* based on the type of database being used.
*
* @author Thomas Risberg
* @since 2.5

2
spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProviderFactory.java

@ -31,7 +31,7 @@ import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor; @@ -31,7 +31,7 @@ import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor;
/**
* Factory used to create a {@link TableMetaDataProvider} implementation
* based on the type of databse being used.
* based on the type of database being used.
*
* @author Thomas Risberg
* @since 2.5

1
spring-web/src/test/java/org/springframework/http/ResponseEntityTests.java

@ -193,7 +193,6 @@ public class ResponseEntityTests { @@ -193,7 +193,6 @@ public class ResponseEntityTests {
@Test
public void emptyCacheControl() {
Integer entity = new Integer(42);
ResponseEntity<Integer> responseEntity =

3
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java

@ -58,7 +58,6 @@ import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolv @@ -58,7 +58,6 @@ import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolv
*/
public class RequestResponseBodyMethodProcessor extends AbstractMessageConverterMethodProcessor {
/**
* Basic constructor with converters only. Suitable for resolving
* {@code @RequestBody}. For handling {@code @ResponseBody} consider also
@ -126,6 +125,7 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter @@ -126,6 +125,7 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter
Object arg = readWithMessageConverters(webRequest, parameter, parameter.getGenericParameterType());
String name = Conventions.getVariableNameForParameter(parameter);
WebDataBinder binder = binderFactory.createBinder(webRequest, arg, name);
if (arg != null) {
validateIfApplicable(binder, parameter);
@ -134,6 +134,7 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter @@ -134,6 +134,7 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter
}
}
mavContainer.addAttribute(BindingResult.MODEL_KEY_PREFIX + name, binder.getBindingResult());
return arg;
}

Loading…
Cancel
Save