Polishing

This commit is contained in:
Juergen Hoeller 2014-09-10 01:28:54 +02:00
parent 5790fc904a
commit 1e7bfd91a7
5 changed files with 5 additions and 11 deletions

View File

@ -194,7 +194,6 @@ public class SocketUtils {
private static enum SocketType {
TCP {
@Override
protected boolean isPortAvailable(int port) {
try {
@ -209,7 +208,6 @@ public class SocketUtils {
},
UDP {
@Override
protected boolean isPortAvailable(int port) {
try {

View File

@ -357,7 +357,7 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations
@Override
public int[] batchUpdate(String sql, SqlParameterSource[] batchArgs) {
ParsedSql parsedSql = this.getParsedSql(sql);
ParsedSql parsedSql = getParsedSql(sql);
return NamedParameterBatchUpdateUtils.executeBatchUpdateWithNamedParameters(parsedSql, batchArgs, getJdbcOperations());
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 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.
@ -40,8 +40,7 @@ public @interface Header {
/**
* Whether the header is required.
* <p>
* Default is {@code true}, leading to an exception if the header missing. Switch this
* <p>Default is {@code true}, leading to an exception if the header missing. Switch this
* to {@code false} if you prefer a {@code null} in case of the header missing.
*/
boolean required() default true;

View File

@ -90,7 +90,6 @@ public class HeaderMethodArgumentResolverTests {
@Test
public void resolveArgumentNativeHeader() throws Exception {
TestMessageHeaderAccessor headers = new TestMessageHeaderAccessor();
headers.setNativeHeader("param1", "foo");
Message<byte[]> message = MessageBuilder.withPayload(new byte[0]).setHeaders(headers).build();
@ -100,7 +99,6 @@ public class HeaderMethodArgumentResolverTests {
@Test
public void resolveArgumentNativeHeaderAmbiguity() throws Exception {
TestMessageHeaderAccessor headers = new TestMessageHeaderAccessor();
headers.setHeader("param1", "foo");
headers.setNativeHeader("param1", "native-foo");

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 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.
@ -60,8 +60,7 @@ public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueMet
}
@Override
protected Object resolveName(String name, MethodParameter parameter, NativeWebRequest webRequest)
throws Exception {
protected Object resolveName(String name, MethodParameter parameter, NativeWebRequest webRequest) throws Exception {
// No name to resolve
return null;
}