checkstyle Misc Rules
checkstyle Nesting checkstyle GenericWhitespace checkstyle MethodParamPad checkstyle NoWhiteSpace checkstyle ParenPad Script checkstyle ParenPad
This commit is contained in:
committed by
Artem Bilan
parent
05cc7be644
commit
57f96bb759
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -47,9 +47,9 @@ public class TcpOutboundGatewayParser extends AbstractConsumerEndpointParser {
|
||||
IpAdapterParserUtils.REPLY_CHANNEL);
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element,
|
||||
IpAdapterParserUtils.REQUEST_TIMEOUT);
|
||||
BeanDefinition remoteTimeoutExpression = IntegrationNamespaceUtils.createExpressionDefinitionFromValueOrExpression
|
||||
(IpAdapterParserUtils.REMOTE_TIMEOUT, IpAdapterParserUtils.REMOTE_TIMEOUT_EXPRESSION,
|
||||
parserContext, element, false);
|
||||
BeanDefinition remoteTimeoutExpression = IntegrationNamespaceUtils
|
||||
.createExpressionDefinitionFromValueOrExpression(IpAdapterParserUtils.REMOTE_TIMEOUT,
|
||||
IpAdapterParserUtils.REMOTE_TIMEOUT_EXPRESSION, parserContext, element, false);
|
||||
if (remoteTimeoutExpression != null) {
|
||||
builder.addPropertyValue("remoteTimeoutExpression", remoteTimeoutExpression);
|
||||
}
|
||||
|
||||
@@ -31,17 +31,16 @@ import javax.net.SocketFactory;
|
||||
public interface TcpSocketFactorySupport {
|
||||
|
||||
/**
|
||||
* Supplies the {@link ServerSocketFactory} to be used to
|
||||
* create new {@link ServerSocket}s.
|
||||
* Supplies the {@link ServerSocketFactory} to be used to create new
|
||||
* {@link ServerSocket}s.
|
||||
* @return the ServerSocketFacory
|
||||
*/
|
||||
ServerSocketFactory getServerSocketFactory();
|
||||
ServerSocketFactory getServerSocketFactory();
|
||||
|
||||
/**
|
||||
* Supplies the {@link SocketFactory} to be used to
|
||||
* create new {@link Socket}s.
|
||||
* @return the SocketFactory
|
||||
*/
|
||||
SocketFactory getSocketFactory();
|
||||
/**
|
||||
* Supplies the {@link SocketFactory} to be used to create new {@link Socket}s.
|
||||
* @return the SocketFactory
|
||||
*/
|
||||
SocketFactory getSocketFactory();
|
||||
|
||||
}
|
||||
|
||||
@@ -28,21 +28,19 @@ import java.net.Socket;
|
||||
public interface TcpSocketSupport {
|
||||
|
||||
/**
|
||||
* Performs any further modifications to the server socket
|
||||
* after the connection factory has created the socket and
|
||||
* set any configured attributes, before invoking
|
||||
* Performs any further modifications to the server socket after the connection
|
||||
* factory has created the socket and set any configured attributes, before invoking
|
||||
* {@link ServerSocket#accept()}.
|
||||
* @param serverSocket The ServerSocket
|
||||
*/
|
||||
void postProcessServerSocket(ServerSocket serverSocket);
|
||||
void postProcessServerSocket(ServerSocket serverSocket);
|
||||
|
||||
/**
|
||||
* Performs any further modifications to the {@link Socket} after
|
||||
* the socket has been created by a client, or accepted by
|
||||
* a server, and after any configured atributes have been
|
||||
* set.
|
||||
* @param socket The Socket
|
||||
*/
|
||||
void postProcessSocket(Socket socket);
|
||||
/**
|
||||
* Performs any further modifications to the {@link Socket} after the socket has been
|
||||
* created by a client, or accepted by a server, and after any configured atributes
|
||||
* have been set.
|
||||
* @param socket The Socket
|
||||
*/
|
||||
void postProcessSocket(Socket socket);
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public final class TestingUtilities {
|
||||
}
|
||||
|
||||
if (n++ > delay) {
|
||||
throw new IllegalStateException ("Server didn't start listening.");
|
||||
throw new IllegalStateException("Server didn't start listening.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public final class TestingUtilities {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
if (n++ > 200) {
|
||||
throw new IllegalStateException ("Server didn't stop listening.");
|
||||
throw new IllegalStateException("Server didn't stop listening.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class MultiClientTests {
|
||||
final AtomicBoolean done = new AtomicBoolean();
|
||||
|
||||
for (int i = 0; i < drivers; i++) {
|
||||
Thread t = new Thread( new Runnable() {
|
||||
Thread t = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UnicastSendingMessageHandler sender = new UnicastSendingMessageHandler(
|
||||
@@ -85,10 +85,10 @@ public class MultiClientTests {
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
}
|
||||
for (int i = 0; i < drivers * 3 ; i++) {
|
||||
for (int i = 0; i < drivers * 3; i++) {
|
||||
queueIn.send(MessageBuilder.withPayload(payload).build());
|
||||
}
|
||||
for (int i = 0; i < drivers * 3 ; i++) {
|
||||
for (int i = 0; i < drivers * 3; i++) {
|
||||
Message<byte[]> messageOut = (Message<byte[]>) queue.receive(10000);
|
||||
assertNotNull(messageOut);
|
||||
Assert.assertEquals(payload, new String(messageOut.getPayload()));
|
||||
@@ -116,7 +116,7 @@ public class MultiClientTests {
|
||||
|
||||
for (int i = 0; i < drivers; i++) {
|
||||
final int j = i;
|
||||
Thread t = new Thread( new Runnable() {
|
||||
Thread t = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UnicastSendingMessageHandler sender = new UnicastSendingMessageHandler(
|
||||
@@ -138,10 +138,10 @@ public class MultiClientTests {
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
}
|
||||
for (int i = 0; i < drivers * 3 ; i++) {
|
||||
for (int i = 0; i < drivers * 3; i++) {
|
||||
queueIn.send(MessageBuilder.withPayload(payload).build());
|
||||
}
|
||||
for (int i = 0; i < drivers * 3 ; i++) {
|
||||
for (int i = 0; i < drivers * 3; i++) {
|
||||
Message<byte[]> messageOut = (Message<byte[]>) queue.receive(20000);
|
||||
assertNotNull(messageOut);
|
||||
Assert.assertEquals(payload, new String(messageOut.getPayload()));
|
||||
@@ -169,7 +169,7 @@ public class MultiClientTests {
|
||||
|
||||
for (int i = 0; i < drivers; i++) {
|
||||
final int j = i;
|
||||
Thread t = new Thread( new Runnable() {
|
||||
Thread t = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UnicastSendingMessageHandler sender = new UnicastSendingMessageHandler(
|
||||
@@ -191,10 +191,10 @@ public class MultiClientTests {
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
}
|
||||
for (int i = 0; i < drivers * 3 ; i++) {
|
||||
for (int i = 0; i < drivers * 3; i++) {
|
||||
queueIn.send(MessageBuilder.withPayload(payload).build());
|
||||
}
|
||||
for (int i = 0; i < drivers * 3 ; i++) {
|
||||
for (int i = 0; i < drivers * 3; i++) {
|
||||
Message<byte[]> messageOut = (Message<byte[]>) queue.receive(10000);
|
||||
assertNotNull(messageOut);
|
||||
Assert.assertEquals(payload, new String(messageOut.getPayload()));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -29,7 +29,7 @@ public class RegexUtilsTests {
|
||||
* Verify that we properly escape all special characters for matching regex
|
||||
*/
|
||||
@Test
|
||||
public void testRegex () {
|
||||
public void testRegex() {
|
||||
String s = "xxx$^[]{()}+*\\?|.xxx";
|
||||
assertEquals("xxx\\$\\^\\[\\]\\{\\(\\)\\}\\+\\*\\\\\\?\\|\\.xxx", RegexUtils.escapeRegexSpecials(s));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user