Polishing
This commit is contained in:
parent
5790fc904a
commit
1e7bfd91a7
|
@ -194,7 +194,6 @@ public class SocketUtils {
|
||||||
private static enum SocketType {
|
private static enum SocketType {
|
||||||
|
|
||||||
TCP {
|
TCP {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isPortAvailable(int port) {
|
protected boolean isPortAvailable(int port) {
|
||||||
try {
|
try {
|
||||||
|
@ -209,7 +208,6 @@ public class SocketUtils {
|
||||||
},
|
},
|
||||||
|
|
||||||
UDP {
|
UDP {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isPortAvailable(int port) {
|
protected boolean isPortAvailable(int port) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -357,7 +357,7 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] batchUpdate(String sql, SqlParameterSource[] batchArgs) {
|
public int[] batchUpdate(String sql, SqlParameterSource[] batchArgs) {
|
||||||
ParsedSql parsedSql = this.getParsedSql(sql);
|
ParsedSql parsedSql = getParsedSql(sql);
|
||||||
return NamedParameterBatchUpdateUtils.executeBatchUpdateWithNamedParameters(parsedSql, batchArgs, getJdbcOperations());
|
return NamedParameterBatchUpdateUtils.executeBatchUpdateWithNamedParameters(parsedSql, batchArgs, getJdbcOperations());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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.
|
* Whether the header is required.
|
||||||
* <p>
|
* <p>Default is {@code true}, leading to an exception if the header missing. Switch this
|
||||||
* 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.
|
* to {@code false} if you prefer a {@code null} in case of the header missing.
|
||||||
*/
|
*/
|
||||||
boolean required() default true;
|
boolean required() default true;
|
||||||
|
|
|
@ -90,7 +90,6 @@ public class HeaderMethodArgumentResolverTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void resolveArgumentNativeHeader() throws Exception {
|
public void resolveArgumentNativeHeader() throws Exception {
|
||||||
|
|
||||||
TestMessageHeaderAccessor headers = new TestMessageHeaderAccessor();
|
TestMessageHeaderAccessor headers = new TestMessageHeaderAccessor();
|
||||||
headers.setNativeHeader("param1", "foo");
|
headers.setNativeHeader("param1", "foo");
|
||||||
Message<byte[]> message = MessageBuilder.withPayload(new byte[0]).setHeaders(headers).build();
|
Message<byte[]> message = MessageBuilder.withPayload(new byte[0]).setHeaders(headers).build();
|
||||||
|
@ -100,7 +99,6 @@ public class HeaderMethodArgumentResolverTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void resolveArgumentNativeHeaderAmbiguity() throws Exception {
|
public void resolveArgumentNativeHeaderAmbiguity() throws Exception {
|
||||||
|
|
||||||
TestMessageHeaderAccessor headers = new TestMessageHeaderAccessor();
|
TestMessageHeaderAccessor headers = new TestMessageHeaderAccessor();
|
||||||
headers.setHeader("param1", "foo");
|
headers.setHeader("param1", "foo");
|
||||||
headers.setNativeHeader("param1", "native-foo");
|
headers.setNativeHeader("param1", "native-foo");
|
||||||
|
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -60,8 +60,7 @@ public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueMet
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Object resolveName(String name, MethodParameter parameter, NativeWebRequest webRequest)
|
protected Object resolveName(String name, MethodParameter parameter, NativeWebRequest webRequest) throws Exception {
|
||||||
throws Exception {
|
|
||||||
// No name to resolve
|
// No name to resolve
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue