extends AbstractTransformer {
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/transformer/ExpressionEvaluatingTransformer.java b/spring-integration-core/src/main/java/org/springframework/integration/transformer/ExpressionEvaluatingTransformer.java
index 679ced3f28..f2e59886a4 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/transformer/ExpressionEvaluatingTransformer.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/transformer/ExpressionEvaluatingTransformer.java
@@ -23,7 +23,7 @@ import org.springframework.integration.handler.ExpressionEvaluatingMessageProces
* A Message Transformer implementation that evaluates the specified SpEL
* expression. The result of evaluation will typically be considered as the
* payload of a new Message unless it is itself already a Message.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadDeserializingTransformer.java b/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadDeserializingTransformer.java
index c1165d87e6..a87fa5e685 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadDeserializingTransformer.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadDeserializingTransformer.java
@@ -23,9 +23,9 @@ import org.springframework.core.serializer.support.DeserializingConverter;
* Transformer that deserializes the inbound byte array payload to an object by delegating to a
* Converter<byte[], Object>. Default delegate is a {@link DeserializingConverter} using
* Java serialization.
- *
+ *
* The byte array payload must be a result of equivalent serialization.
- *
+ *
* @author Mark Fisher
* @author Gary Russell
* @since 1.0.1
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadSerializingTransformer.java b/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadSerializingTransformer.java
index 63e10b9b03..8ae15cfa1d 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadSerializingTransformer.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadSerializingTransformer.java
@@ -20,12 +20,12 @@ import org.springframework.core.serializer.Serializer;
import org.springframework.core.serializer.support.SerializingConverter;
/**
- * Transformer that serializes the inbound payload into a byte array by delegating to a
+ * Transformer that serializes the inbound payload into a byte array by delegating to a
* Converter<Object, byte[]>. Default delegate is a {@link SerializingConverter} using
* Java serialization.
- *
+ *
*
The payload instance must be Serializable if the default converter is used.
- *
+ *
* @author Mark Fisher
* @author Gary Russell
* @since 1.0.1
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadTypeConvertingTransformer.java b/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadTypeConvertingTransformer.java
index 008f9d4e6c..9406d54e73 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadTypeConvertingTransformer.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/transformer/PayloadTypeConvertingTransformer.java
@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
/**
* Transformer that converts the inbound payload to an object by delegating to a
* Converter<Object, Object>. A reference to the delegate must be provided.
- *
+ *
* @author Gary Russell
* @since 2.0
*/
@@ -32,7 +32,7 @@ public class PayloadTypeConvertingTransformer extends AbstractPayloadTrans
/**
* Specify the converter to use.
- *
+ *
* @param converter The Converter.
*/
public void setConverter(Converter converter) {
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/util/AcceptOnceCollectionFilter.java b/spring-integration-core/src/main/java/org/springframework/integration/util/AcceptOnceCollectionFilter.java
index 521552c095..8234236eb3 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/util/AcceptOnceCollectionFilter.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/util/AcceptOnceCollectionFilter.java
@@ -24,7 +24,7 @@ import java.util.List;
/**
* An implementation of {@link CollectionFilter} that remembers the elements passed in
* the previous invocation in order to avoid returning those elements more than once.
- *
+ *
* @author Mark Fisher
* @since 2.1
*/
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/util/AnnotatedMethodFilter.java b/spring-integration-core/src/main/java/org/springframework/integration/util/AnnotatedMethodFilter.java
index 7620f416c1..ce1aa10d96 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/util/AnnotatedMethodFilter.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/util/AnnotatedMethodFilter.java
@@ -33,7 +33,7 @@ import org.springframework.util.StringUtils;
* limiting to annotated methods if at least one is present
*
*
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/util/CollectionFilter.java b/spring-integration-core/src/main/java/org/springframework/integration/util/CollectionFilter.java
index b1adc56362..9b5797130e 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/util/CollectionFilter.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/util/CollectionFilter.java
@@ -20,7 +20,7 @@ import java.util.Collection;
/**
* Base strategy for filtering out a subset of a Collection of elements.
- *
+ *
* @author Oleg Zhurakousky
* @author Mark Fisher
* @since 2.1
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/util/UUIDConverter.java b/spring-integration-core/src/main/java/org/springframework/integration/util/UUIDConverter.java
index 26690c29f6..efcf478859 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/util/UUIDConverter.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/util/UUIDConverter.java
@@ -27,7 +27,7 @@ import org.springframework.util.ClassUtils;
/**
* Utility to help generate UUID instances from generic objects.
- *
+ *
* @author Dave Syer
*/
public class UUIDConverter implements Converter {
@@ -38,7 +38,7 @@ public class UUIDConverter implements Converter {
/**
* Convert the input to a UUID using the convenience method
* {@link #getUUID(Object)}.
- *
+ *
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
*/
public UUID convert(Object source) {
@@ -60,7 +60,7 @@ public class UUIDConverter implements Converter {
* the serialized bytes of the input
*
* If none of the above applies there will be an exception trying to serialize.
- *
+ *
* @param input an Object
* @return a UUID constructed from the input
*/
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/util/package-info.java b/spring-integration-core/src/main/java/org/springframework/integration/util/package-info.java
index e52823c34a..19949298af 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/util/package-info.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/util/package-info.java
@@ -1,4 +1,4 @@
/**
- * Provides core utility classes.
+ * Provides core utility classes.
*/
package org.springframework.integration.util;
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/aggregator/ConcurrentAggregatorTests.java b/spring-integration-core/src/test/java/org/springframework/integration/aggregator/ConcurrentAggregatorTests.java
index 4692c0eb6c..e1dcda88b3 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/aggregator/ConcurrentAggregatorTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/aggregator/ConcurrentAggregatorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 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.
@@ -322,10 +322,12 @@ public class ConcurrentAggregatorTests {
public void run() {
try {
this.aggregator.handleMessage(message);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
this.exception = e;
- } finally {
+ }
+ finally {
this.latch.countDown();
}
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/aggregator/CorrelatingMessageBarrierTests.java b/spring-integration-core/src/test/java/org/springframework/integration/aggregator/CorrelatingMessageBarrierTests.java
index 5bd7663c04..b179161136 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/aggregator/CorrelatingMessageBarrierTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/aggregator/CorrelatingMessageBarrierTests.java
@@ -96,7 +96,8 @@ public class CorrelatingMessageBarrierTests {
try {
sent.await();
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
@@ -113,7 +114,8 @@ public class CorrelatingMessageBarrierTests {
public void run() {
try {
start.await();
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
handler.handleMessage(message);
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/channel/ChannelPurgerTests.java b/spring-integration-core/src/test/java/org/springframework/integration/channel/ChannelPurgerTests.java
index 690b72fb7b..3c053898cf 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/channel/ChannelPurgerTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/channel/ChannelPurgerTests.java
@@ -122,7 +122,7 @@ public class ChannelPurgerTests {
channel1.send(new GenericMessage("test3"));
channel2.send(new GenericMessage("test1"));
channel2.send(new GenericMessage("test2"));
- channel2.send(new GenericMessage("test3"));
+ channel2.send(new GenericMessage("test3"));
ChannelPurger purger = new ChannelPurger(new MessageSelector() {
public boolean accept(Message> message) {
return (message.getPayload().equals("test2"));
@@ -137,7 +137,7 @@ public class ChannelPurgerTests {
Message> message2 = channel2.receive(0);
assertNotNull(message2);
assertEquals("test2", message2.getPayload());
- assertNull(channel2.receive(0));
+ assertNull(channel2.receive(0));
}
@Test
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/channel/MixedDispatcherConfigurationScenarioTests.java b/spring-integration-core/src/test/java/org/springframework/integration/channel/MixedDispatcherConfigurationScenarioTests.java
index 071794226a..234bffd1d1 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/channel/MixedDispatcherConfigurationScenarioTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/channel/MixedDispatcherConfigurationScenarioTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -108,11 +108,13 @@ public class MixedDispatcherConfigurationScenarioTests {
dispatcher.addHandler(handlerB);
try {
channel.send(message);
- } catch (Exception e) {/* ignore */
+ }
+ catch (Exception e) {/* ignore */
}
try {
channel.send(message);
- } catch (Exception e) {/* ignore */
+ }
+ catch (Exception e) {/* ignore */
}
verify(handlerA, times(2)).handleMessage(message);
verify(handlerB, times(0)).handleMessage(message);
@@ -131,13 +133,15 @@ public class MixedDispatcherConfigurationScenarioTests {
public void run() {
try {
start.await();
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
boolean sent = false;
try {
sent = channel.send(message);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
exceptionRegistry.add(e);
}
if (!sent) {
@@ -193,7 +197,8 @@ public class MixedDispatcherConfigurationScenarioTests {
public void run() {
try {
start.await();
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
channel.send(message);
@@ -226,17 +231,20 @@ public class MixedDispatcherConfigurationScenarioTests {
InOrder inOrder = inOrder(handlerA, handlerB, handlerC);
try {
channel.send(message);
- } catch (Exception e) {/* ignore */
+ }
+ catch (Exception e) {/* ignore */
}
inOrder.verify(handlerA).handleMessage(message);
try {
channel.send(message);
- } catch (Exception e) {/* ignore */
+ }
+ catch (Exception e) {/* ignore */
}
inOrder.verify(handlerB).handleMessage(message);
try {
channel.send(message);
- } catch (Exception e) {/* ignore */
+ }
+ catch (Exception e) {/* ignore */
}
inOrder.verify(handlerC).handleMessage(message);
@@ -263,13 +271,15 @@ public class MixedDispatcherConfigurationScenarioTests {
public void run() {
try {
start.await();
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
boolean sent = false;
try {
sent = channel.send(message);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
exceptionRegistry.add(e);
}
if (!sent) {
@@ -336,7 +346,8 @@ public class MixedDispatcherConfigurationScenarioTests {
public void run() {
try {
start.await();
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
channel.send(message);
@@ -371,14 +382,16 @@ public class MixedDispatcherConfigurationScenarioTests {
try {
channel.send(message);
- } catch (Exception e) {/* ignore */
+ }
+ catch (Exception e) {/* ignore */
}
inOrder.verify(handlerA).handleMessage(message);
inOrder.verify(handlerB).handleMessage(message);
try {
channel.send(message);
- } catch (Exception e) {/* ignore */
+ }
+ catch (Exception e) {/* ignore */
}
inOrder.verify(handlerA).handleMessage(message);
inOrder.verify(handlerB).handleMessage(message);
@@ -407,13 +420,15 @@ public class MixedDispatcherConfigurationScenarioTests {
public void run() {
try {
start.await();
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
boolean sent = false;
try {
sent = channel.send(message);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
exceptionRegistry.add(e);
}
if (!sent) {
@@ -473,7 +488,8 @@ public class MixedDispatcherConfigurationScenarioTests {
public void run() {
try {
start.await();
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
channel.send(message);
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/channel/P2pChannelTests.java b/spring-integration-core/src/test/java/org/springframework/integration/channel/P2pChannelTests.java
index cd42ce4b33..61d17d2343 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/channel/P2pChannelTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/channel/P2pChannelTests.java
@@ -44,7 +44,7 @@ import org.springframework.util.ReflectionUtils.FieldCallback;
*
*/
public class P2pChannelTests {
-
+
@Test
public void testDirectChannelLoggingWithMoreThenOneSubscriber() {
final DirectChannel channel = new DirectChannel();
@@ -110,7 +110,7 @@ public class P2pChannelTests {
assertEquals(String.format(log, 0), logs.remove(0));
verify(logger, times(4)).info(Mockito.anyString());
}
-
+
@Test
public void testExecutorChannelLoggingWithMoreThenOneSubscriber() {
final ExecutorChannel channel = new ExecutorChannel(mock(Executor.class));
@@ -132,7 +132,7 @@ public class P2pChannelTests {
channel.subscribe(mock(MessageHandler.class));
verify(logger, times(2)).info(Mockito.anyString());
}
-
+
@Test
public void testPubSubChannelLoggingWithMoreThenOneSubscriber() {
final PublishSubscribeChannel channel = new PublishSubscribeChannel();
@@ -141,7 +141,7 @@ public class P2pChannelTests {
final Log logger = mock(Log.class);
when(logger.isInfoEnabled()).thenReturn(true);
ReflectionUtils.doWithFields(AbstractMessageChannel.class, new FieldCallback() {
-
+
public void doWith(Field field) throws IllegalArgumentException,
IllegalAccessException {
if ("logger".equals(field.getName())){
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/Adder.java b/spring-integration-core/src/test/java/org/springframework/integration/config/Adder.java
index 90b3f3937d..425774a1e9 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/Adder.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/Adder.java
@@ -22,7 +22,7 @@ import java.util.List;
* @author Marius Bogoevici
*/
public class Adder {
-
+
public Long add(List results) {
long total = 0l;
for (long partialResult: results) {
@@ -30,5 +30,5 @@ public class Adder {
}
return total;
}
-
+
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java
index b802d00f6f..d7d89c2155 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -279,7 +279,8 @@ public class ChannelAdapterParserTests {
@Test(expected = BeanDefinitionParsingException.class)
public void innerBeanAndExpressionFail() throws Exception {
- new ClassPathXmlApplicationContext("InboundChannelAdapterInnerBeanWithExpression-fail-context.xml", this.getClass()).close();;
+ new ClassPathXmlApplicationContext("InboundChannelAdapterInnerBeanWithExpression-fail-context.xml",
+ this.getClass()).close();
}
@Test
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/MaxValueReleaseStrategy.java b/spring-integration-core/src/test/java/org/springframework/integration/config/MaxValueReleaseStrategy.java
index 5e31e88d91..b3ba9db436 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/MaxValueReleaseStrategy.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/MaxValueReleaseStrategy.java
@@ -22,12 +22,12 @@ import java.util.List;
public class MaxValueReleaseStrategy {
private long maxValue;
-
-
+
+
public MaxValueReleaseStrategy(long maxValue){
this.maxValue = maxValue;
}
-
+
public boolean checkCompletenessAsList(List numbers) {
int sum = 0;
for (long number: numbers) {
@@ -35,7 +35,7 @@ public class MaxValueReleaseStrategy {
}
return sum >= maxValue;
}
-
+
public boolean checkCompletenessAsCollection(Collection numbers) {
int sum = 0;
for (long number: numbers) {
@@ -43,5 +43,5 @@ public class MaxValueReleaseStrategy {
}
return sum >= maxValue;
}
-
+
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/SelectorChainParserTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/SelectorChainParserTests.java
index 751b319674..ab44932c62 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/SelectorChainParserTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/SelectorChainParserTests.java
@@ -42,7 +42,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
public class SelectorChainParserTests {
-
+
@Autowired
ApplicationContext context;
@@ -103,13 +103,13 @@ public class SelectorChainParserTests {
private VotingStrategy getStrategy(MessageSelectorChain chain) {
return (VotingStrategy) new DirectFieldAccessor(chain).getPropertyValue("votingStrategy");
}
-
+
public static class StubMessageSelector implements MessageSelector {
public boolean accept(Message> message) {
return true;
}
}
-
+
public static class StubPojoSelector {
public boolean accept(Message> message) {
return true;
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/ServiceActivatorAnnotationPostProcessorTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/ServiceActivatorAnnotationPostProcessorTests.java
index 06a881454c..fe8ff358a0 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/ServiceActivatorAnnotationPostProcessorTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/ServiceActivatorAnnotationPostProcessorTests.java
@@ -82,7 +82,7 @@ public class ServiceActivatorAnnotationPostProcessorTests {
}
- @MessageEndpoint
+ @MessageEndpoint
public static class SimpleServiceActivatorAnnotationTestBean extends AbstractServiceActivatorAnnotationTestBean {
public SimpleServiceActivatorAnnotationTestBean(CountDownLatch latch) {
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/TopLevelSelectorParserTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/TopLevelSelectorParserTests.java
index c597af52a4..aa1772e26b 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/TopLevelSelectorParserTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/TopLevelSelectorParserTests.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
public class TopLevelSelectorParserTests {
-
+
@Autowired
ApplicationContext context;
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusChainTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusChainTests.java
index 1f21b2ddc4..ee48ef2c8c 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusChainTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusChainTests.java
@@ -62,7 +62,7 @@ public class ControlBusChainTests {
return "cat";
}
}
-
+
public static class AdapterService {
public Message receive() {
return new GenericMessage(new Date().toString());
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/EnricherParserTests2.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/EnricherParserTests2.java
index 6e70ff9a16..c4b150eab9 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/EnricherParserTests2.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/EnricherParserTests2.java
@@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* @author Mark Fisher
* @author Gunnar Hillert
- *
+ *
* @since 2.1
*/
@RunWith(SpringJUnit4ClassRunner.class)
@@ -41,9 +41,9 @@ public class EnricherParserTests2 {
@Test
public void configurationCheckRequiresReply() {
-
+
Object endpoint = context.getBean("enricher");
-
+
boolean requiresReply = TestUtils.getPropertyValue(endpoint, "handler.requiresReply", Boolean.class);
assertFalse("Was expecting requiresReply to be 'false'", requiresReply);
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ErrorChannelAutoCreationTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ErrorChannelAutoCreationTests.java
index 6895706401..1ae3f5e59b 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ErrorChannelAutoCreationTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/ErrorChannelAutoCreationTests.java
@@ -34,14 +34,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
public class ErrorChannelAutoCreationTests {
-
+
@Autowired
private MessageChannel errorChannel;
-
+
// see INT-1899
@Test
public void testErrorChannelIsPubSub(){
assertEquals(PublishSubscribeChannel.class, errorChannel.getClass());
}
-
+
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/HeaderEnricherParserTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/HeaderEnricherParserTests.java
index 833f98f36c..3ea8d0bf55 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/HeaderEnricherParserTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/HeaderEnricherParserTests.java
@@ -81,10 +81,10 @@ public class HeaderEnricherParserTests {
Boolean shouldSkipNulls = TestUtils.getPropertyValue(endpoint, "handler.transformer.shouldSkipNulls", Boolean.class);
assertEquals(Boolean.TRUE, shouldSkipNulls);
}
-
- @Test(expected=MessageTransformationException.class)
+
+ @Test(expected=MessageTransformationException.class)
public void testStringPriorityHeader() {
- MessageHandler messageHandler =
+ MessageHandler messageHandler =
TestUtils.getPropertyValue(context.getBean("headerEnricherWithPriorityAsString"), "handler", MessageHandler.class);
Message> message = new GenericMessage("hello");
messageHandler.handleMessage(message);
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/HeaderEnricherTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/HeaderEnricherTests.java
index 0cfa142ade..af0faf8795 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/HeaderEnricherTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/HeaderEnricherTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -294,8 +294,12 @@ public class HeaderEnricherTests {
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
TestBean testBean = (TestBean) o;
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/InboundChannelAdapterWithDefaultPollerTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/InboundChannelAdapterWithDefaultPollerTests.java
index 302ca75ad7..40ed69f42f 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/InboundChannelAdapterWithDefaultPollerTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/InboundChannelAdapterWithDefaultPollerTests.java
@@ -41,7 +41,7 @@ public class InboundChannelAdapterWithDefaultPollerTests {
private SourcePollingChannelAdapter adapter;
- @Test
+ @Test
public void verifyDefaultPollerInUse() {
Trigger trigger = TestUtils.getPropertyValue(adapter, "trigger", Trigger.class);
assertEquals(PeriodicTrigger.class, trigger.getClass());
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/InnerBeanConfigTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/InnerBeanConfigTests.java
index 501d8a41c3..0e4c925cc1 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/InnerBeanConfigTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/InnerBeanConfigTests.java
@@ -48,7 +48,7 @@ public class InnerBeanConfigTests {
public void checkInnerBean() {
Object innerBean = TestUtils.getPropertyValue(testEndpoint, "handler.processor.delegate.targetObject");
assertNotNull(innerBean);
- context.getBean(TestBean.class);
+ context.getBean(TestBean.class);
}
@@ -57,5 +57,5 @@ public class InnerBeanConfigTests {
return value;
}
}
-
+
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/PNamespaceTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/PNamespaceTests.java
index 43644f15d4..dc956d0ae8 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/PNamespaceTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/PNamespaceTests.java
@@ -32,7 +32,7 @@ import static org.junit.Assert.assertEquals;
/**
* Validates the "p:namespace" is working for inner "bean" definition within SI components.
- *
+ *
* @author Oleg Zhurakousky
*/
@ContextConfiguration
@@ -45,7 +45,7 @@ public class PNamespaceTests {
@Autowired
@Qualifier("sp")
- EventDrivenConsumer splitter;
+ EventDrivenConsumer splitter;
@Autowired
@Qualifier("rt")
@@ -54,21 +54,21 @@ public class PNamespaceTests {
@Autowired
@Qualifier("tr")
EventDrivenConsumer transformer;
-
+
@Autowired
@Qualifier("sampleChain")
EventDrivenConsumer sampleChain;
@Test
- public void testPNamespaceServiceActivator() {
+ public void testPNamespaceServiceActivator() {
TestBean bean = prepare(serviceActivator);
assertEquals("paris", bean.getFname());
assertEquals("hilton", bean.getLname());
}
@Test
- public void testPNamespaceSplitter() {
+ public void testPNamespaceSplitter() {
TestBean bean = prepare(splitter);
assertEquals("paris", bean.getFname());
assertEquals("hilton", bean.getLname());
@@ -82,17 +82,17 @@ public class PNamespaceTests {
}
@Test
- public void testPNamespaceTransformer() {
+ public void testPNamespaceTransformer() {
TestBean bean = prepare(transformer);
assertEquals("paris", bean.getFname());
assertEquals("hilton", bean.getLname());
}
-
+
@Test
- public void testPNamespaceChain() {
+ public void testPNamespaceChain() {
List> handlers = (List>) TestUtils.getPropertyValue(sampleChain, "handler.handlers");
AggregatingMessageHandler handler = (AggregatingMessageHandler) handlers.get(0);
- SampleAggregator aggregator =
+ SampleAggregator aggregator =
(SampleAggregator) TestUtils.getPropertyValue(handler, "outputProcessor.processor.delegate.targetObject");
assertEquals("Bill", aggregator.getName());
}
@@ -130,7 +130,7 @@ public class PNamespaceTests {
public void setLname(String lname) {
this.lname = lname;
}
-
+
public String printWithPrefix(String prefix) {
return prefix + fname + " " + lname;
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests.java b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests.java
index 28397624ad..763eaf2fba 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/config/xml/propertyplaceholder/PropertyPlaceholderTests.java
@@ -22,7 +22,7 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
- *
+ *
* @author Iwein Fuld
*
*/
@@ -34,7 +34,7 @@ public class PropertyPlaceholderTests {
public void context() throws Exception {
//parsing and instantiating is enough
}
-
+
public static class SanityCheck{
public SanityCheck(Integer i) {
//this will throw an exception if the placeholder isn't replaced
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/core/TimeBasedUUIDGenerator.java b/spring-integration-core/src/test/java/org/springframework/integration/core/TimeBasedUUIDGenerator.java
index a535a06d24..364bde8ac9 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/core/TimeBasedUUIDGenerator.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/core/TimeBasedUUIDGenerator.java
@@ -56,7 +56,8 @@ class TimeBasedUUIDGenerator {
if (currentTimeMillis > lastTime) {
lastTime = currentTimeMillis;
clockSequence = 0;
- } else {
+ }
+ else {
++clockSequence;
}
}
@@ -83,7 +84,8 @@ class TimeBasedUUIDGenerator {
if (canNotDetermineMac){
logger.warning("UUID generation process was not able to determine your MAC address. Returning random UUID (non version 1 UUID)");
return UUID.randomUUID();
- } else {
+ }
+ else {
return new UUID(time, lsb);
}
}
@@ -104,7 +106,8 @@ class TimeBasedUUIDGenerator {
}
}
canNotDetermineMac = false;
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
}
return macAddressAsLong;
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/BroadcastingDispatcherTests.java b/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/BroadcastingDispatcherTests.java
index 51e92c0e2e..408531acc0 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/BroadcastingDispatcherTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/BroadcastingDispatcherTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -249,7 +249,8 @@ public class BroadcastingDispatcherTests {
try {
dispatcher.dispatch(messageMock);
fail("Expected Exception");
- } catch (MessagingException e) {
+ }
+ catch (MessagingException e) {
assertEquals(messageMock, e.getFailedMessage());
}
}
@@ -269,7 +270,8 @@ public class BroadcastingDispatcherTests {
try {
dispatcher.dispatch(messageMock);
fail("Expected Exception");
- } catch (MessagingException e) {
+ }
+ catch (MessagingException e) {
assertEquals(dontReplaceThisMessage, e.getFailedMessage());
}
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/OrderedAwareCopyOnWriteArraySetTests.java b/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/OrderedAwareCopyOnWriteArraySetTests.java
index fa138e7b52..80bc7eee30 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/OrderedAwareCopyOnWriteArraySetTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/OrderedAwareCopyOnWriteArraySetTests.java
@@ -187,7 +187,8 @@ public class OrderedAwareCopyOnWriteArraySetTests {
t1.join();
t2.join();
t3.join();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
@@ -268,7 +269,8 @@ public class OrderedAwareCopyOnWriteArraySetTests {
t1.join();
t2.join();
t3.join();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/PollingTransactionTests.java b/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/PollingTransactionTests.java
index 3c0c87b484..12c3f3c48e 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/PollingTransactionTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/PollingTransactionTests.java
@@ -62,19 +62,19 @@ public class PollingTransactionTests {
input.send(new GenericMessage("test"));
txManager.waitForCompletion(1000);
Message> message = output.receive(0);
- assertNotNull(message);
+ assertNotNull(message);
assertEquals(1, txManager.getCommitCount());
assertEquals(0, txManager.getRollbackCount());
context.stop();
}
-
+
@Test
@SuppressWarnings("unchecked")
public void transactionWithCommitAndAdvices() throws InterruptedException {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"transactionTests.xml", this.getClass());
PollingConsumer advicedPoller = context.getBean("advicedSa", PollingConsumer.class);
-
+
List adviceChain = TestUtils.getPropertyValue(advicedPoller, "adviceChain",List.class);
assertEquals(3, adviceChain.size());
Runnable poller = TestUtils.getPropertyValue(advicedPoller, "poller", Runnable.class);
@@ -204,6 +204,6 @@ public class PollingTransactionTests {
public static class SampleAdvice implements MethodInterceptor {
public Object invoke(MethodInvocation invocation) throws Throwable {
return invocation.proceed();
- }
+ }
}
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/RoundRobinDispatcherTests.java b/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/RoundRobinDispatcherTests.java
index 95327bcf06..b497aea3b5 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/RoundRobinDispatcherTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/dispatcher/RoundRobinDispatcherTests.java
@@ -115,7 +115,8 @@ public class RoundRobinDispatcherTests {
try {
dispatcher.dispatch(message);
fail("Expected Exception");
- } catch (MessagingException e) {
+ }
+ catch (MessagingException e) {
assertEquals(message, e.getFailedMessage());
}
}
@@ -133,7 +134,8 @@ public class RoundRobinDispatcherTests {
try {
dispatcher.dispatch(message);
fail("Expected Exception");
- } catch (MessagingException e) {
+ }
+ catch (MessagingException e) {
assertEquals(dontReplaceThisMessage, e.getFailedMessage());
}
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/endpoint/PollerAdviceTests.java b/spring-integration-core/src/test/java/org/springframework/integration/endpoint/PollerAdviceTests.java
index a4c546e8bd..dc62889ef0 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/endpoint/PollerAdviceTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/endpoint/PollerAdviceTests.java
@@ -141,7 +141,7 @@ public class PollerAdviceTests {
return null;
}
- };
+ }
CountDownLatch latch = new CountDownLatch(1);
adapter.setSource(new LocalSource(latch));
class OneAndDone10msTrigger implements Trigger {
@@ -154,7 +154,7 @@ public class PollerAdviceTests {
done = true;
return date;
}
- };
+ }
adapter.setTrigger(new OneAndDone10msTrigger());
configure(adapter);
List adviceChain = new ArrayList();
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/expression/DynamicExpressionTests.java b/spring-integration-core/src/test/java/org/springframework/integration/expression/DynamicExpressionTests.java
index a99535905d..433422c6f5 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/expression/DynamicExpressionTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/expression/DynamicExpressionTests.java
@@ -64,7 +64,7 @@ public class DynamicExpressionTests {
}
catch (Exception e) {
throw new IllegalStateException("failed to write expression string to file", e);
- }
+ }
}
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/filter/MessageFilterTests.java b/spring-integration-core/src/test/java/org/springframework/integration/filter/MessageFilterTests.java
index 58732ca23f..51c21efcfb 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/filter/MessageFilterTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/filter/MessageFilterTests.java
@@ -181,7 +181,7 @@ public class MessageFilterTests {
assertEquals(message, reply);
assertNull(outputChannel.receive(0));
}
-
+
}
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/gateway/MultipleEndpointGatewayTests.java b/spring-integration-core/src/test/java/org/springframework/integration/gateway/MultipleEndpointGatewayTests.java
index 1453a0da0f..cd75d326e7 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/gateway/MultipleEndpointGatewayTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/gateway/MultipleEndpointGatewayTests.java
@@ -32,15 +32,15 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
public class MultipleEndpointGatewayTests {
-
+
@Autowired
@Qualifier("gatewayA")
private SampleGateway gatewayA;
-
+
@Autowired
- @Qualifier("gatewayB")
+ @Qualifier("gatewayB")
private SampleGateway gatewayB;
-
+
@Test
public void gatewayNoDefaultReplyChannel(){
gatewayA.echo("echoAsMessageChannel");
@@ -51,17 +51,17 @@ public class MultipleEndpointGatewayTests {
gatewayB.echo("echoAsMessageChannelIgnoreDefOutChannel");
// there is nothing to assert. Successful execution of the above is all we care in this test
}
-
+
@Test
public void gatewayWithReplySentBackToDefaultReplyChannel(){
gatewayB.echo("echoAsMessageChannelDefaultOutputChannel");
// there is nothing to assert. Successful execution of the above is all we care in this test
}
-
+
public interface SampleGateway{
Object echo(Object value);
}
-
+
public static class SampleEchoService {
public Object echo(Object value){
return "R:" + value;
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/handler/BogusAnnotation.java b/spring-integration-core/src/test/java/org/springframework/integration/handler/BogusAnnotation.java
index dfa0b0fd6a..faac6d0f50 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/handler/BogusAnnotation.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/handler/BogusAnnotation.java
@@ -27,6 +27,6 @@ import java.lang.annotation.Target;
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
-public @interface BogusAnnotation {
+public @interface BogusAnnotation {
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/json/TestBean.java b/spring-integration-core/src/test/java/org/springframework/integration/json/TestBean.java
index 8dcedfbf43..667a2d7979 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/json/TestBean.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/json/TestBean.java
@@ -19,13 +19,13 @@ package org.springframework.integration.json;
import java.util.Date;
public class TestBean {
-
+
private String value = "foo";
private boolean test = false;
private long number = 42;
-
+
private Date now = new Date();
private TestChildBean child = new TestChildBean();
@@ -83,27 +83,38 @@ public class TestBean {
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
TestBean other = (TestBean) obj;
if (child == null) {
- if (other.child != null)
+ if (other.child != null) {
return false;
- } else if (!child.equals(other.child))
+ }
+ }
+ else if (!child.equals(other.child)) {
return false;
- if (number != other.number)
+ }
+ if (number != other.number) {
return false;
- if (test != other.test)
+ }
+ if (test != other.test) {
return false;
+ }
if (value == null) {
- if (other.value != null)
+ if (other.value != null) {
return false;
- } else if (!value.equals(other.value))
+ }
+ }
+ else if (!value.equals(other.value)) {
return false;
+ }
return true;
}
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/json/TestChildBean.java b/spring-integration-core/src/test/java/org/springframework/integration/json/TestChildBean.java
index dcf8f6a427..10242b9bda 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/json/TestChildBean.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/json/TestChildBean.java
@@ -60,28 +60,40 @@ public class TestChildBean {
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
TestChildBean other = (TestChildBean) obj;
if (baz == null) {
- if (other.baz != null)
+ if (other.baz != null) {
return false;
- } else if (!baz.equals(other.baz))
+ }
+ }
+ else if (!baz.equals(other.baz)) {
return false;
+ }
if (parent == null) {
- if (other.parent != null)
+ if (other.parent != null) {
return false;
- } else if (!parent.equals(other.parent))
+ }
+ }
+ else if (!parent.equals(other.parent)) {
return false;
+ }
if (value == null) {
- if (other.value != null)
+ if (other.value != null) {
return false;
- } else if (!value.equals(other.value))
+ }
+ }
+ else if (!value.equals(other.value)) {
return false;
+ }
return true;
}
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/message/MessageMatcher.java b/spring-integration-core/src/test/java/org/springframework/integration/message/MessageMatcher.java
index c313552bd0..026a0e519d 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/message/MessageMatcher.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/message/MessageMatcher.java
@@ -26,7 +26,7 @@ import org.springframework.messaging.MessageHeaders;
/**
* Matcher to make assertions about message equality easier. Usage:
- *
+ *
*
* @Test
* public void testSomething() {
@@ -34,7 +34,7 @@ import org.springframework.messaging.MessageHeaders;
* Message result = ...;
* assertThat(result, sameExceptImmutableHeaders(expected));
* }
- *
+ *
* @Factory
* public static Matcher> sameExceptImmutableHeaders(Message> expected) {
* return new MessageMatcher(expected);
@@ -70,5 +70,5 @@ public class MessageMatcher extends BaseMatcher> {
public void describeTo(Description description) {
description.appendText("Headers match except ID and timestamp for payload: ").appendValue(payload).appendText(" and headers: ").appendValue(headers);
}
-
+
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/router/config/RfbFixRouter.java b/spring-integration-core/src/test/java/org/springframework/integration/router/config/RfbFixRouter.java
index 697293a5b1..ef3d0d387b 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/router/config/RfbFixRouter.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/router/config/RfbFixRouter.java
@@ -26,7 +26,7 @@ import org.springframework.integration.router.AbstractMessageRouter;
* @author Oleg Zhurakousky
*/
public class RfbFixRouter extends AbstractMessageRouter {
-
+
@Override
protected Collection determineTargetChannels(Message> message) {
return null;
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/router/config/SplitterAggregatorTests.java b/spring-integration-core/src/test/java/org/springframework/integration/router/config/SplitterAggregatorTests.java
index aaf9d90ae0..e9ddbb6037 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/router/config/SplitterAggregatorTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/router/config/SplitterAggregatorTests.java
@@ -51,7 +51,7 @@ public class SplitterAggregatorTests {
assertNotNull(result1);
assertEquals(Integer.class, result1.getPayload().getClass());
assertEquals(55, result1.getPayload());
- inputChannel.send(new GenericMessage(this.nextTen()));
+ inputChannel.send(new GenericMessage(this.nextTen()));
Message> result2 = outputChannel.receive(1000);
assertNotNull(result2);
assertEquals(Integer.class, result2.getPayload().getClass());
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/transformer/PayloadDeserializingTransformerTests.java b/spring-integration-core/src/test/java/org/springframework/integration/transformer/PayloadDeserializingTransformerTests.java
index 2f97c29faf..968045aa3e 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/transformer/PayloadDeserializingTransformerTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/transformer/PayloadDeserializingTransformerTests.java
@@ -87,7 +87,7 @@ public class PayloadDeserializingTransformerTests {
private static class TestBean implements Serializable {
private String name;
-
+
TestBean(String name) {
this.name = name;
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/transformer/PayloadSerializingTransformerTests.java b/spring-integration-core/src/test/java/org/springframework/integration/transformer/PayloadSerializingTransformerTests.java
index 8546b032ae..776872c954 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/transformer/PayloadSerializingTransformerTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/transformer/PayloadSerializingTransformerTests.java
@@ -69,7 +69,7 @@ public class PayloadSerializingTransformerTests {
PayloadSerializingTransformer transformer = new PayloadSerializingTransformer();
transformer.transform(new GenericMessage(new Object()));
}
-
+
@Test
public void customSerializer() {
PayloadSerializingTransformer transformer = new PayloadSerializingTransformer();
@@ -87,7 +87,7 @@ public class PayloadSerializingTransformerTests {
private static class TestBean implements Serializable {
private String name;
-
+
TestBean(String name) {
this.name = name;
}
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/util/SimplePoolTests.java b/spring-integration-core/src/test/java/org/springframework/integration/util/SimplePoolTests.java
index e1a8c1c19e..19a1701634 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/util/SimplePoolTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/util/SimplePoolTests.java
@@ -84,7 +84,8 @@ public class SimplePoolTests {
try {
pool.getItem();
fail("Expected exception");
- } catch (MessagingException e) {}
+ }
+ catch (MessagingException e) {}
// resize up
pool.setPoolSize(4);
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/util/UUIDConverterTests.java b/spring-integration-core/src/test/java/org/springframework/integration/util/UUIDConverterTests.java
index d02406a61c..99cc433c69 100644
--- a/spring-integration-core/src/test/java/org/springframework/integration/util/UUIDConverterTests.java
+++ b/spring-integration-core/src/test/java/org/springframework/integration/util/UUIDConverterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 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.
@@ -57,7 +57,8 @@ public class UUIDConverterTests {
try {
UUID.fromString(name);
fail();
- } catch (IllegalArgumentException e) {
+ }
+ catch (IllegalArgumentException e) {
String message = e.getMessage();
assertTrue("Wrong message: "+message, message.contains("Invalid UUID string"));
}
diff --git a/spring-integration-event/src/main/java/org/springframework/integration/event/config/EventNamespaceHandler.java b/spring-integration-event/src/main/java/org/springframework/integration/event/config/EventNamespaceHandler.java
index bb049925db..015c97cacc 100644
--- a/spring-integration-event/src/main/java/org/springframework/integration/event/config/EventNamespaceHandler.java
+++ b/spring-integration-event/src/main/java/org/springframework/integration/event/config/EventNamespaceHandler.java
@@ -20,7 +20,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa
/**
* Namespace handler for Spring Integration's 'event' namespace.
- *
+ *
* @author Oleg Zhurakousky
* @since 2.0
*/
diff --git a/spring-integration-event/src/main/java/org/springframework/integration/event/core/MessagingEvent.java b/spring-integration-event/src/main/java/org/springframework/integration/event/core/MessagingEvent.java
index 9f90464d90..c92b2ff7a6 100644
--- a/spring-integration-event/src/main/java/org/springframework/integration/event/core/MessagingEvent.java
+++ b/spring-integration-event/src/main/java/org/springframework/integration/event/core/MessagingEvent.java
@@ -21,7 +21,7 @@ import org.springframework.messaging.Message;
/**
* A subclass of {@link ApplicationEvent} that wraps a {@link Message}.
- *
+ *
* @author Mark Fisher
*/
public class MessagingEvent extends ApplicationEvent {
diff --git a/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedNamespaceHandler.java b/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedNamespaceHandler.java
index a047ad2024..b97562c8b8 100644
--- a/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedNamespaceHandler.java
+++ b/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedNamespaceHandler.java
@@ -20,7 +20,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa
/**
* NamespaceHandler for the feed module.
- *
+ *
* @author Josh Long
* @author Mark Fisher
* @since 2.0
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/FileNameGenerator.java b/spring-integration-file/src/main/java/org/springframework/integration/file/FileNameGenerator.java
index c0f0c13b51..9ff63784cb 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/FileNameGenerator.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/FileNameGenerator.java
@@ -20,7 +20,7 @@ import org.springframework.messaging.Message;
/**
* Strategy interface for generating a file name from a message.
- *
+ *
* @author Mark Fisher
*/
public interface FileNameGenerator {
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java b/spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java
index 06657e0779..f633e75c92 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java
@@ -905,7 +905,7 @@ public class FileWritingMessageHandler extends AbstractReplyProducingMessageHand
}
}
catch (IOException e) {
- ;
+ // ignore
}
}
}
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/config/FileWritingMessageHandlerFactoryBean.java b/spring-integration-file/src/main/java/org/springframework/integration/file/config/FileWritingMessageHandlerFactoryBean.java
index d216e10f3b..2649b424cc 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/config/FileWritingMessageHandlerFactoryBean.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/config/FileWritingMessageHandlerFactoryBean.java
@@ -144,7 +144,8 @@ public class FileWritingMessageHandlerFactoryBean
}
else if (this.directoryExpression != null) {
handler = new FileWritingMessageHandler(this.directoryExpression);
- } else {
+ }
+ else {
throw new IllegalStateException("Either directory or directoryExpression must not be null");
}
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPersistentAcceptOnceFileListFilter.java b/spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPersistentAcceptOnceFileListFilter.java
index 9377499d73..563dbcd2d6 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPersistentAcceptOnceFileListFilter.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPersistentAcceptOnceFileListFilter.java
@@ -84,7 +84,7 @@ public abstract class AbstractPersistentAcceptOnceFileListFilter extends Abst
if (this.store.replace(key, oldValue, newValue)) {
flushIfNeeded();
return true;
- };
+ }
}
return false;
}
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/filters/RegexPatternFileListFilter.java b/spring-integration-file/src/main/java/org/springframework/integration/file/filters/RegexPatternFileListFilter.java
index 425fd8d738..c059fa91ee 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/filters/RegexPatternFileListFilter.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/filters/RegexPatternFileListFilter.java
@@ -21,7 +21,7 @@ import java.util.regex.Pattern;
/**
* Implementation of AbstractRegexPatternMatchingFileListFilter for java.io.File instances.
- *
+ *
* @author Mark Fisher
*/
public class RegexPatternFileListFilter extends AbstractRegexPatternFileListFilter {
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/locking/NioFileLocker.java b/spring-integration-file/src/main/java/org/springframework/integration/file/locking/NioFileLocker.java
index 2ffc133e21..d8ae1150d5 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/locking/NioFileLocker.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/locking/NioFileLocker.java
@@ -50,7 +50,8 @@ public class NioFileLocker extends AbstractFileLockerFilter {
FileLock newLock = null;
try {
newLock = FileChannelCache.tryLockFor(fileToLock);
- } catch (IOException e) {
+ }
+catch (IOException e) {
throw new MessagingException("Failed to lock file: "
+ fileToLock, e);
}
@@ -73,7 +74,8 @@ public class NioFileLocker extends AbstractFileLockerFilter {
fileLock.release();
}
FileChannelCache.closeChannelFor(fileToUnlock);
- } catch (IOException e) {
+ }
+catch (IOException e) {
throw new MessagingException("Failed to unlock file: "
+ fileToUnlock, e);
}
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/AbstractFileInfo.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/AbstractFileInfo.java
index 741fd6d827..35365d5cda 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/AbstractFileInfo.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/AbstractFileInfo.java
@@ -21,7 +21,7 @@ import java.util.Date;
/**
* Abstract implementation of {@link FileInfo}; provides a setter
* for the remote directory and a generic toString implementation.
- *
+ *
* @author Gary Russell
* @since 2.1
*/
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/session/SessionFactory.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/session/SessionFactory.java
index 9fb637abf3..7703d196f2 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/session/SessionFactory.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/session/SessionFactory.java
@@ -18,7 +18,7 @@ package org.springframework.integration.file.remote.session;
/**
* Factory for acquiring {@link Session} instances.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/InboundFileSynchronizer.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/InboundFileSynchronizer.java
index a3b0946448..c147811f12 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/InboundFileSynchronizer.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/InboundFileSynchronizer.java
@@ -20,7 +20,7 @@ import java.io.File;
/**
* Strategy for synchronizing from a remote File system to a local directory.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/transformer/AbstractFilePayloadTransformer.java b/spring-integration-file/src/main/java/org/springframework/integration/file/transformer/AbstractFilePayloadTransformer.java
index 48b724c6f0..a817af5174 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/transformer/AbstractFilePayloadTransformer.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/transformer/AbstractFilePayloadTransformer.java
@@ -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.
@@ -96,7 +96,8 @@ public abstract class AbstractFilePayloadTransformer implements Transformer,
}
}
return transformedMessage;
- } catch (Exception e) {
+ }
+catch (Exception e) {
throw new MessagingException(message, "failed to transform File Message", e);
}
}
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/transformer/FileToByteArrayTransformer.java b/spring-integration-file/src/main/java/org/springframework/integration/file/transformer/FileToByteArrayTransformer.java
index 83039f7361..76ccbc22c0 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/transformer/FileToByteArrayTransformer.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/transformer/FileToByteArrayTransformer.java
@@ -22,7 +22,7 @@ import org.springframework.util.FileCopyUtils;
/**
* A payload transformer that copies a File's contents to a byte array.
- *
+ *
* @author Mark Fisher
*/
public class FileToByteArrayTransformer extends AbstractFilePayloadTransformer {
diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/FileOutboundChannelAdapterIntegrationTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/FileOutboundChannelAdapterIntegrationTests.java
index 102fb3289d..dc0744c50f 100644
--- a/spring-integration-file/src/test/java/org/springframework/integration/file/FileOutboundChannelAdapterIntegrationTests.java
+++ b/spring-integration-file/src/test/java/org/springframework/integration/file/FileOutboundChannelAdapterIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 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.
@@ -120,7 +120,8 @@ public class FileOutboundChannelAdapterIntegrationTests {
try {
this.inputChannelSaveToSubDirWrongExpression.send(message);
- } catch (MessageHandlingException e) {
+ }
+ catch (MessageHandlingException e) {
Assert.assertEquals(
TestUtils.applySystemFileSeparator("Destination path [target/base-directory/sub-directory/foo.txt] does not point to a directory."),
e.getCause().getMessage());
@@ -135,7 +136,8 @@ public class FileOutboundChannelAdapterIntegrationTests {
try {
this.inputChannelSaveToSubDirEmptyStringExpression.send(message);
- } catch (MessageHandlingException e) {
+ }
+ catch (MessageHandlingException e) {
Assert.assertEquals("Unable to resolve destination directory name for the provided Expression '' ''.", e.getCause().getMessage());
return;
}
@@ -159,7 +161,8 @@ public class FileOutboundChannelAdapterIntegrationTests {
try {
this.inputChannelSaveToSubDirAutoCreateOff.send(message);
- } catch (MessageHandlingException e) {
+ }
+ catch (MessageHandlingException e) {
Assert.assertEquals(
TestUtils.applySystemFileSeparator("Destination directory [target/base-directory2/sub-directory2] does not exist."),
e.getCause().getMessage());
@@ -190,7 +193,8 @@ public class FileOutboundChannelAdapterIntegrationTests {
try {
this.inputChannelSaveToSubDirWithFile.send(messageWithFileHeader);
- } catch (MessageHandlingException e) {
+ }
+ catch (MessageHandlingException e) {
Assert.assertEquals("The provided destinationDirectoryExpression " +
"(headers['subDirectory']) must not resolve to null.",
e.getCause().getMessage());
@@ -211,7 +215,8 @@ public class FileOutboundChannelAdapterIntegrationTests {
try {
this.inputChannelSaveToSubDirWithFile.send(messageWithFileHeader);
- } catch (MessageHandlingException e) {
+ }
+ catch (MessageHandlingException e) {
Assert.assertEquals("The provided destinationDirectoryExpression" +
" (headers['subDirectory']) must be of type " +
"java.io.File or be a String.",
diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileInboundChannelAdapterWithClasspathInPropertiesTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileInboundChannelAdapterWithClasspathInPropertiesTests.java
index f6b585c18a..77b77dc832 100644
--- a/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileInboundChannelAdapterWithClasspathInPropertiesTests.java
+++ b/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileInboundChannelAdapterWithClasspathInPropertiesTests.java
@@ -48,7 +48,7 @@ public class FileInboundChannelAdapterWithClasspathInPropertiesTests {
}
@Test
- public void inputDirectory() throws Exception {
+ public void inputDirectory() throws Exception {
File expected = new ClassPathResource("").getFile();
File actual = (File) accessor.getPropertyValue("directory");
assertEquals("'directory' should be set", expected, actual);
diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserWithErrorsTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserWithErrorsTests.java
index 83541b7cc5..9f7ba09438 100644
--- a/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserWithErrorsTests.java
+++ b/spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserWithErrorsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 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.
@@ -35,7 +35,8 @@ public class FileOutboundChannelAdapterParserWithErrorsTests {
try {
new ClassPathXmlApplicationContext("FileOutboundChannelAdapterParserWithErrorsTests-context.xml", getClass());
- } catch (BeanDefinitionParsingException e) {
+ }
+ catch (BeanDefinitionParsingException e) {
assertEquals("Configuration problem: Either directory or " +
"directory-expression must be provided but not both\nOffending " +
"resource: class path " +
@@ -53,7 +54,8 @@ public class FileOutboundChannelAdapterParserWithErrorsTests {
try {
new ClassPathXmlApplicationContext("FileOutboundChannelAdapterParserWithErrors2Tests-context.xml", getClass());
- } catch (BeanDefinitionParsingException e) {
+ }
+ catch (BeanDefinitionParsingException e) {
assertEquals("Configuration problem: directory or directory-expression " +
"is required\nOffending resource: class path resource " +
"[org/springframework/integration/file/config/FileOutboundChannelAdapterParserWithErrors2Tests-context.xml]",
diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/filters/SimplePatternFileListFilterTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/filters/SimplePatternFileListFilterTests.java
index b5d1912a84..b0ae9ebec6 100644
--- a/spring-integration-file/src/test/java/org/springframework/integration/file/filters/SimplePatternFileListFilterTests.java
+++ b/spring-integration-file/src/test/java/org/springframework/integration/file/filters/SimplePatternFileListFilterTests.java
@@ -39,7 +39,7 @@ public class SimplePatternFileListFilterTests {
public void shouldMatchQuestionMark() {
assertThat(new SimplePatternFileListFilter("*bar").accept(new File("bar")), is(true));
}
-
+
@Test
public void shouldMatchWildcard() {
assertThat(new SimplePatternFileListFilter("ba?").accept(new File("bar")), is(true));
diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/filters/FtpRegexPatternFileListFilter.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/filters/FtpRegexPatternFileListFilter.java
index 0ada50d8a2..785072b662 100644
--- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/filters/FtpRegexPatternFileListFilter.java
+++ b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/filters/FtpRegexPatternFileListFilter.java
@@ -24,7 +24,7 @@ import org.springframework.integration.file.filters.AbstractRegexPatternFileList
/**
* Implementation of {@link AbstractRegexPatternFileListFilter} for FTP.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/filters/FtpSimplePatternFileListFilter.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/filters/FtpSimplePatternFileListFilter.java
index 2aad1f1dab..05c59fa186 100644
--- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/filters/FtpSimplePatternFileListFilter.java
+++ b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/filters/FtpSimplePatternFileListFilter.java
@@ -22,7 +22,7 @@ import org.springframework.integration.file.filters.AbstractSimplePatternFileLis
/**
* Implementation of {@link AbstractSimplePatternFileListFilter} for FTP.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/inbound/FtpInboundFileSynchronizingMessageSource.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/inbound/FtpInboundFileSynchronizingMessageSource.java
index 040c36d28e..d46b3dd9df 100644
--- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/inbound/FtpInboundFileSynchronizingMessageSource.java
+++ b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/inbound/FtpInboundFileSynchronizingMessageSource.java
@@ -38,7 +38,7 @@ public class FtpInboundFileSynchronizingMessageSource extends AbstractInboundFil
public FtpInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer synchronizer) {
super(synchronizer);
}
-
+
public FtpInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer synchronizer, Comparator comparator) {
super(synchronizer, comparator);
}
diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpFileInfo.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpFileInfo.java
index 2d954424fc..377f6b8f52 100644
--- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpFileInfo.java
+++ b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpFileInfo.java
@@ -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.
@@ -67,54 +67,65 @@ public class FtpFileInfo extends AbstractFileInfo {
StringBuilder sb = new StringBuilder();
if (this.ftpFile.isDirectory()) {
sb.append("d");
- } else if (this.ftpFile.isSymbolicLink()) {
+ }
+ else if (this.ftpFile.isSymbolicLink()) {
sb.append("l");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION)) {
sb.append("r");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION)) {
sb.append("w");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.EXECUTE_PERMISSION)) {
sb.append("x");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.READ_PERMISSION)) {
sb.append("r");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.WRITE_PERMISSION)) {
sb.append("w");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.EXECUTE_PERMISSION)) {
sb.append("x");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.READ_PERMISSION)) {
sb.append("r");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.WRITE_PERMISSION)) {
sb.append("w");
- } else {
+ }
+ else {
sb.append("-");
}
if (this.ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.EXECUTE_PERMISSION)) {
sb.append("x");
- } else {
+ }
+ else {
sb.append("-");
}
return sb.toString();
diff --git a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/inbound/FtpInboundRemoteFileSystemSynchronizerTests.java b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/inbound/FtpInboundRemoteFileSystemSynchronizerTests.java
index aa03b7fc9b..d80c7e11d0 100644
--- a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/inbound/FtpInboundRemoteFileSystemSynchronizerTests.java
+++ b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/inbound/FtpInboundRemoteFileSystemSynchronizerTests.java
@@ -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.
@@ -198,7 +198,8 @@ public class FtpInboundRemoteFileSystemSynchronizerTests {
when(ftpClient.listFiles("remote-test-dir")).thenReturn(ftpFiles.toArray(new FTPFile[ftpFiles.size()]));
when(ftpClient.deleteFile(Mockito.anyString())).thenReturn(true);
return ftpClient;
- } catch (Exception e) {
+ }
+ catch (Exception e) {
throw new RuntimeException("Failed to create mock client", e);
}
}
diff --git a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpOutboundTests.java b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpOutboundTests.java
index 083e5b7e1d..7fbe6df517 100644
--- a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpOutboundTests.java
+++ b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpOutboundTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -282,7 +282,8 @@ public class FtpOutboundTests {
}
when(ftpClient.listFiles("remote-test-dir/")).thenReturn(ftpFiles.toArray(new FTPFile[]{}));
return ftpClient;
- } catch (Exception e) {
+ }
+ catch (Exception e) {
throw new RuntimeException("Failed to create mock client", e);
}
}
diff --git a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/session/SessionFactoryTests.java b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/session/SessionFactoryTests.java
index 81c010fd35..ebd67d0ffa 100644
--- a/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/session/SessionFactoryTests.java
+++ b/spring-integration-ftp/src/test/java/org/springframework/integration/ftp/session/SessionFactoryTests.java
@@ -116,7 +116,8 @@ public class SessionFactoryTests {
clientMode == FTPClient.PASSIVE_LOCAL_DATA_CONNECTION_MODE)){
fail();
}
- } catch (IllegalArgumentException e) {
+ }
+ catch (IllegalArgumentException e) {
// success
} catch (Throwable e) {
fail();
@@ -197,7 +198,8 @@ public class SessionFactoryTests {
Session session = factory.getSession();
Thread.sleep(random.nextInt(5000));
session.close();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
failures.incrementAndGet();
}
diff --git a/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/config/xml/GemfireIntegrationNamespaceHandler.java b/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/config/xml/GemfireIntegrationNamespaceHandler.java
index 37977e187e..bf576b5c06 100644
--- a/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/config/xml/GemfireIntegrationNamespaceHandler.java
+++ b/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/config/xml/GemfireIntegrationNamespaceHandler.java
@@ -17,7 +17,7 @@
package org.springframework.integration.gemfire.config.xml;
import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler;
-
+
/**
* @author David Turanski
* @since 2.1
diff --git a/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/CacheListeningMessageProducer.java b/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/CacheListeningMessageProducer.java
index 2dd67337e2..814c64edfd 100644
--- a/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/CacheListeningMessageProducer.java
+++ b/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/CacheListeningMessageProducer.java
@@ -90,7 +90,8 @@ public class CacheListeningMessageProducer extends ExpressionMessageProducerSupp
}
try {
this.region.getAttributesMutator().removeCacheListener(this.listener);
- } catch (CacheClosedException e) {
+ }
+ catch (CacheClosedException e) {
if (this.logger.isDebugEnabled()){
this.logger.debug(e.getMessage(),e);
}
diff --git a/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/CqEventType.java b/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/CqEventType.java
index 80eb276e57..3d8ea7d6c2 100644
--- a/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/CqEventType.java
+++ b/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/CqEventType.java
@@ -27,8 +27,8 @@ public enum CqEventType {
UPDATED,
DESTROYED,
-
+
REGION_CLEARED,
-
+
REGION_INVALIDATED
}
diff --git a/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/EventType.java b/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/EventType.java
index 62790e3948..8a9e477558 100644
--- a/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/EventType.java
+++ b/spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/inbound/EventType.java
@@ -18,7 +18,7 @@ package org.springframework.integration.gemfire.inbound;
/**
* Enumeration of GemFire event types.
- *
+ *
* @author Mark Fisher
* @since 2.1
*/
diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/TestCacheListenerLogger.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/TestCacheListenerLogger.java
index 09c8566063..f3f7afd700 100644
--- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/TestCacheListenerLogger.java
+++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/TestCacheListenerLogger.java
@@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory;
/**
* (this is the CacheLogger class that ships in the Spring-Gemfire samples)
- *
+ *
* @author Costin Leau
*/
public class TestCacheListenerLogger extends CacheListenerAdapter {
diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/fork/ForkUtil.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/fork/ForkUtil.java
index 524dffda30..8d9be093c0 100644
--- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/fork/ForkUtil.java
+++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/fork/ForkUtil.java
@@ -145,7 +145,8 @@ public class ForkUtil {
}
if (controlFileExists(className)){
System.out.println("Started cache server");
- } else {
+ }
+ else {
throw new RuntimeException("could not fork cache server");
}
return os;
diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests.java
index 2e53747ebe..0812a71ad1 100644
--- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests.java
+++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests.java
@@ -100,7 +100,8 @@ public class CqInboundChannelAdapterTests {
try {
os.write("\n".getBytes());
os.flush();
- } catch (IOException ex) {
+ }
+ catch (IOException ex) {
throw new IllegalStateException("Cannot communicate with forked VM", ex);
}
}
diff --git a/spring-integration-groovy/src/test/java/org/springframework/integration/groovy/RepeatProcessor.java b/spring-integration-groovy/src/test/java/org/springframework/integration/groovy/RepeatProcessor.java
index 5968266b5a..7d9a55c8a9 100644
--- a/spring-integration-groovy/src/test/java/org/springframework/integration/groovy/RepeatProcessor.java
+++ b/spring-integration-groovy/src/test/java/org/springframework/integration/groovy/RepeatProcessor.java
@@ -1,99 +1,102 @@
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.groovy;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.rules.MethodRule;
-import org.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.Statement;
-import org.springframework.core.annotation.AnnotationUtils;
-import org.springframework.test.annotation.Repeat;
-
-/**
- * A method rule that looks at Spring repeat annotations on methods and executes the test multiple times (without
- * re-initializing the test case).
- *
- * @author Dave Syer
- * @since 2.0
- *
- */
-public class RepeatProcessor implements MethodRule {
-
- private final int concurrency;
-
- public RepeatProcessor(int concurrency) {
- this.concurrency = concurrency < 0 ? 0 : concurrency;
- }
-
- public Statement apply(final Statement base, FrameworkMethod method, Object target) {
- Repeat repeat = AnnotationUtils.findAnnotation(method.getMethod(), Repeat.class);
- if (repeat == null) {
- return base;
- }
- final int repeats = repeat.value();
- if (concurrency <= 0) {
- return new Statement() {
- @Override
- public void evaluate() throws Throwable {
- for (int i = 0; i < repeats; i++) {
- try {
- base.evaluate();
- } catch (Throwable t) {
- throw new IllegalStateException("Failed on iteration: " + i, t);
- }
- }
- }
- };
- }
- return new Statement() {
- @Override
- public void evaluate() throws Throwable {
- List> results = new ArrayList>();
- ExecutorService executor = Executors.newFixedThreadPool(concurrency);
- try {
- for (int i = 0; i < repeats; i++) {
- final int count = i;
- results.add(executor.submit(new Callable() {
- public Boolean call() {
- try {
- base.evaluate();
- } catch (Throwable t) {
- throw new IllegalStateException("Failed on iteration: " + count, t);
- }
- return true;
- }
- }));
- }
- for (Future future : results) {
- assertTrue("Null result from completer", future.get(10, TimeUnit.SECONDS));
- }
- } finally {
- executor.shutdownNow();
- }
- }
- };
- }
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.integration.groovy;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.rules.MethodRule;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.Statement;
+import org.springframework.core.annotation.AnnotationUtils;
+import org.springframework.test.annotation.Repeat;
+
+/**
+ * A method rule that looks at Spring repeat annotations on methods and executes the test multiple times (without
+ * re-initializing the test case).
+ *
+ * @author Dave Syer
+ * @since 2.0
+ *
+ */
+public class RepeatProcessor implements MethodRule {
+
+ private final int concurrency;
+
+ public RepeatProcessor(int concurrency) {
+ this.concurrency = concurrency < 0 ? 0 : concurrency;
+ }
+
+ public Statement apply(final Statement base, FrameworkMethod method, Object target) {
+ Repeat repeat = AnnotationUtils.findAnnotation(method.getMethod(), Repeat.class);
+ if (repeat == null) {
+ return base;
+ }
+ final int repeats = repeat.value();
+ if (concurrency <= 0) {
+ return new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ for (int i = 0; i < repeats; i++) {
+ try {
+ base.evaluate();
+ }
+ catch (Throwable t) {
+ throw new IllegalStateException("Failed on iteration: " + i, t);
+ }
+ }
+ }
+ };
+ }
+ return new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ List> results = new ArrayList>();
+ ExecutorService executor = Executors.newFixedThreadPool(concurrency);
+ try {
+ for (int i = 0; i < repeats; i++) {
+ final int count = i;
+ results.add(executor.submit(new Callable() {
+ public Boolean call() {
+ try {
+ base.evaluate();
+ }
+ catch (Throwable t) {
+ throw new IllegalStateException("Failed on iteration: " + count, t);
+ }
+ return true;
+ }
+ }));
+ }
+ for (Future future : results) {
+ assertTrue("Null result from completer", future.get(10, TimeUnit.SECONDS));
+ }
+ }
+ finally {
+ executor.shutdownNow();
+ }
+ }
+ };
+ }
}
diff --git a/spring-integration-http/src/main/java/org/springframework/integration/http/multipart/DefaultMultipartFileReader.java b/spring-integration-http/src/main/java/org/springframework/integration/http/multipart/DefaultMultipartFileReader.java
index a7929ecf59..e6a11353b2 100644
--- a/spring-integration-http/src/main/java/org/springframework/integration/http/multipart/DefaultMultipartFileReader.java
+++ b/spring-integration-http/src/main/java/org/springframework/integration/http/multipart/DefaultMultipartFileReader.java
@@ -24,7 +24,7 @@ import org.springframework.web.multipart.MultipartFile;
* {@link MultipartFileReader} implementation that reads the {@link MultipartFile}
* content directly into a new {@link MultipartFile} instance that is not restricted
* to the HTTP request scope.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryParser.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryParser.java
index d057d5beb3..ce74721b48 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryParser.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -40,7 +40,8 @@ public class TcpConnectionFactoryParser extends AbstractBeanDefinitionParser {
if (!StringUtils.hasText(type)) {
parserContext.getReaderContext().error(IpAdapterParserUtils.TCP_CONNECTION_TYPE +
" is required for a tcp connection", element);
- } else if (!"server".equals(type) && !"client".equals(type)) {
+ }
+ else if (!"server".equals(type) && !"client".equals(type)) {
parserContext.getReaderContext().error(IpAdapterParserUtils.TCP_CONNECTION_TYPE +
" must be 'client' or 'server' for a TCP Connection Factory", element);
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpInboundGateway.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpInboundGateway.java
index 824f2da6c6..6ef26c56a8 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpInboundGateway.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpInboundGateway.java
@@ -283,7 +283,8 @@ public class TcpInboundGateway extends MessagingGatewaySupport implements
public boolean isClientModeConnected() {
if (this.isClientMode && this.clientModeConnectionManager != null) {
return this.clientModeConnectionManager.isConnected();
- } else {
+ }
+ else {
return false;
}
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpReceivingChannelAdapter.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpReceivingChannelAdapter.java
index 445097b65d..c8b715eca0 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpReceivingChannelAdapter.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpReceivingChannelAdapter.java
@@ -243,7 +243,8 @@ public class TcpReceivingChannelAdapter
public boolean isClientModeConnected() {
if (this.isClientMode && this.clientModeConnectionManager != null) {
return this.clientModeConnectionManager.isConnected();
- } else {
+ }
+ else {
return false;
}
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpSendingMessageHandler.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpSendingMessageHandler.java
index e3860184f5..76f18d3e68 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpSendingMessageHandler.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/TcpSendingMessageHandler.java
@@ -361,7 +361,8 @@ public class TcpSendingMessageHandler extends AbstractMessageHandler implements
public boolean isClientModeConnected() {
if (this.isClientMode && this.clientModeConnectionManager != null) {
return this.clientModeConnectionManager.isConnected();
- } else {
+ }
+ else {
return false;
}
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractConnectionFactory.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractConnectionFactory.java
index b1877caf28..42fd097def 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractConnectionFactory.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractConnectionFactory.java
@@ -504,10 +504,12 @@ public abstract class AbstractConnectionFactory extends IntegrationObjectSupport
logger.debug("Executor failed to shutdown");
}
}
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
executorService.shutdownNow();
Thread.currentThread().interrupt();
- } finally {
+ }
+ finally {
this.taskExecutor = null;
this.privateExecutor = false;
}
@@ -583,8 +585,7 @@ public abstract class AbstractConnectionFactory extends IntegrationObjectSupport
*/
if (!connection.isServer() &&
now - connection.getLastSend() < this.soTimeout &&
- now - connection.getLastRead() < this.soTimeout * 2)
- {
+ now - connection.getLastRead() < this.soTimeout * 2) {
if (logger.isDebugEnabled()) {
logger.debug("Skipping a connection timeout because we have a recent send "
+ connection.getConnectionId());
@@ -608,7 +609,8 @@ public abstract class AbstractConnectionFactory extends IntegrationObjectSupport
if (logger.isTraceEnabled()) {
if (this.host == null) {
logger.trace("Port " + this.port + " SelectionCount: " + selectionCount);
- } else {
+ }
+ else {
logger.trace("Host " + this.host + " port " + this.port + " SelectionCount: " + selectionCount);
}
}
@@ -668,7 +670,8 @@ public abstract class AbstractConnectionFactory extends IntegrationObjectSupport
else if (key.isAcceptable()) {
try {
doAccept(selector, server, now);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
logger.error("Exception accepting new connection", e);
}
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/ClientModeConnectionManager.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/ClientModeConnectionManager.java
index 3878dd0062..d50c261277 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/ClientModeConnectionManager.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/ClientModeConnectionManager.java
@@ -58,12 +58,14 @@ public class ClientModeConnectionManager implements Runnable {
this.logger.debug("Connection " + connection.getConnectionId() + " established");
}
this.lastConnection = connection;
- } else {
+ }
+ else {
if (this.logger.isTraceEnabled()) {
this.logger.trace("Connection " + connection.getConnectionId() + " still OK");
}
}
- } catch (Exception e) {
+ }
+ catch (Exception e) {
this.logger.error("Could not establish connection using " + this.clientConnectionFactory, e);
}
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/ConnectionFactory.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/ConnectionFactory.java
index 8b30feeb41..ca74042ef4 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/ConnectionFactory.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/ConnectionFactory.java
@@ -22,7 +22,7 @@ import org.springframework.context.SmartLifecycle;
/**
* A factory used to create TcpConnection objects.
- *
+ *
* @author Gary Russell
* @since 2.0
*
@@ -30,5 +30,5 @@ import org.springframework.context.SmartLifecycle;
public interface ConnectionFactory extends SmartLifecycle {
TcpConnection getConnection() throws Exception;
-
+
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpListener.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpListener.java
index e62b36b85c..25c46bde17 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpListener.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpListener.java
@@ -19,8 +19,8 @@ package org.springframework.integration.ip.tcp.connection;
import org.springframework.messaging.Message;
/**
- * Classes that implement this interface may register with a
- * connection factory to receive messages retrieved from a
+ * Classes that implement this interface may register with a
+ * connection factory to receive messages retrieved from a
* {@link TcpConnection}
* @author Gary Russell
* @since 2.0
@@ -34,5 +34,5 @@ public interface TcpListener {
* @return true if the message was intercepted
*/
boolean onMessage(Message> message);
-
+
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioClientConnectionFactory.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioClientConnectionFactory.java
index e88ba99dac..cd387c1951 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioClientConnectionFactory.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioClientConnectionFactory.java
@@ -70,7 +70,8 @@ public class TcpNioClientConnectionFactory extends
while (this.selector == null) {
try {
Thread.sleep(100);
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
if (n++ > 600) {
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java
index 34e9c6742a..1635e6c8b6 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java
@@ -194,7 +194,8 @@ public class TcpNioConnection extends TcpConnectionSupport {
ByteBuffer buffer;
if (this.usingDirectBuffers) {
buffer = ByteBuffer.allocateDirect(length);
- } else {
+ }
+ else {
buffer = ByteBuffer.allocate(length);
}
return buffer;
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioSSLConnection.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioSSLConnection.java
index 315dfb0b42..95dfde8163 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioSSLConnection.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioSSLConnection.java
@@ -311,7 +311,8 @@ public class TcpNioSSLConnection extends TcpNioConnection {
+ remaining);
}
remaining = plainText.remaining();
- } else {
+ }
+ else {
doClientSideHandshake(plainText, result);
writeEncodedIfAny();
}
@@ -374,7 +375,8 @@ public class TcpNioSSLConnection extends TcpNioConnection {
logger.trace("Writer resuming handshake");
}
status = runTasksIfNeeded(result);
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new MessagingException("Interrupted during SSL Handshaking");
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpSender.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpSender.java
index 5bd77d7d0d..605022aa11 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpSender.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpSender.java
@@ -31,12 +31,12 @@ public interface TcpSender {
* @param connection The connection.
*/
void addNewConnection(TcpConnection connection);
-
+
/**
* When we are using sockets owned by a {@link TcpListener}, this
* method is called each time a connection is closed.
* @param connection The connection.
*/
void removeDeadConnection(TcpConnection connection);
-
+
}
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/package-info.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/package-info.java
index 4c77c12dca..62c3890528 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/package-info.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/package-info.java
@@ -1,5 +1,5 @@
/**
- * All things related to tcp connections - client and
+ * All things related to tcp connections - client and
* server factories; listener and sender interfaces.
*/
package org.springframework.integration.ip.tcp.connection;
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/serializer/SoftEndOfStreamException.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/serializer/SoftEndOfStreamException.java
index c91b445247..31534b7a58 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/serializer/SoftEndOfStreamException.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/serializer/SoftEndOfStreamException.java
@@ -21,7 +21,7 @@ import java.io.IOException;
/**
* Used to communicate that a stream has closed, but between logical
* messages.
- *
+ *
* @author Gary Russell
* @since 2.0
*
diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/udp/DatagramPacketMessageMapper.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/udp/DatagramPacketMessageMapper.java
index f66f017e27..7d6180f369 100644
--- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/udp/DatagramPacketMessageMapper.java
+++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/udp/DatagramPacketMessageMapper.java
@@ -213,7 +213,8 @@ public class DatagramPacketMessageMapper implements InboundMessageMapper" +
"" +
- " " +
" " + // <<<<< fixed-rate not allowed here
" " +
@@ -70,7 +70,8 @@ public class InnerPollerParserTests {
Resource resource = new ByteArrayResource(badContext.getBytes());
new GenericXmlApplicationContext(resource);
fail("Expected Failure to load ApplicationContext");
- } catch (BeanDefinitionParsingException bdpe) {
+ }
+ catch (BeanDefinitionParsingException bdpe) {
assertTrue(bdpe.getMessage().startsWith("Configuration problem: A 'poller' element that provides a 'ref' must have no other attributes."));
}
}
@@ -93,7 +94,7 @@ public class InnerPollerParserTests {
"" +
" " +
"" +
- " " +
" " + // <<<<< default true not allowed here
" " +
@@ -106,7 +107,8 @@ public class InnerPollerParserTests {
Resource resource = new ByteArrayResource(badContext.getBytes());
new GenericXmlApplicationContext(resource);
fail("Expected Failure to load ApplicationContext");
- } catch (BeanDefinitionParsingException bdpe) {
+ }
+ catch (BeanDefinitionParsingException bdpe) {
assertTrue(bdpe.getMessage().startsWith("Configuration problem: A 'poller' element that provides a 'ref' must have no other attributes."));
}
}
@@ -129,7 +131,7 @@ public class InnerPollerParserTests {
"" +
" " +
"" +
- " " +
" " + // <<<<< fixed-rate not allowed here
" " +
@@ -142,7 +144,8 @@ public class InnerPollerParserTests {
Resource resource = new ByteArrayResource(badContext.getBytes());
new GenericXmlApplicationContext(resource);
fail("Expected Failure to load ApplicationContext");
- } catch (BeanDefinitionParsingException bdpe) {
+ }
+ catch (BeanDefinitionParsingException bdpe) {
assertTrue(bdpe.getMessage().startsWith("Configuration problem: A 'poller' element that provides a 'ref' must have no other attributes."));
}
}
diff --git a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcTypesEnumTests.java b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcTypesEnumTests.java
index 080cb12612..364a5b6a0c 100644
--- a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcTypesEnumTests.java
+++ b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcTypesEnumTests.java
@@ -48,7 +48,8 @@ public class JdbcTypesEnumTests {
try {
JdbcTypesEnum.convertToJdbcTypesEnum(null);
- } catch (IllegalArgumentException e) {
+ }
+ catch (IllegalArgumentException e) {
assertEquals("Parameter sqlTypeAsString, must not be null nor empty", e.getMessage());
return;
}
@@ -62,7 +63,8 @@ public class JdbcTypesEnumTests {
try {
JdbcTypesEnum.convertToJdbcTypesEnum(" ");
- } catch (IllegalArgumentException e) {
+ }
+ catch (IllegalArgumentException e) {
assertEquals("Parameter sqlTypeAsString, must not be null nor empty", e.getMessage());
return;
}
diff --git a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/channel/TestService.java b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/channel/TestService.java
index ecf27e9154..114ef1b009 100644
--- a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/channel/TestService.java
+++ b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/channel/TestService.java
@@ -62,14 +62,16 @@ public class TestService {
if (seen.containsKey(message)) {
log.error("Already seen: " + message);
duplicateMessagesCount.addAndGet(1);
- } else {
+ }
+ else {
seen.put(message, message);
log.info("Pre: " + message);
if (this.threadSleep >0) {
try {
Thread.sleep(2000);
- } catch (InterruptedException e) {
+ }
+ catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
diff --git a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/ProcedureParameterTests.java b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/ProcedureParameterTests.java
index f2ff1d4b85..21946dd871 100644
--- a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/ProcedureParameterTests.java
+++ b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/ProcedureParameterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2011 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.
@@ -33,7 +33,8 @@ public class ProcedureParameterTests {
try {
new ProcedureParameter(null, "value", "expression");
- } catch(IllegalArgumentException e) {
+ }
+ catch(IllegalArgumentException e) {
assertEquals("'name' must not be empty.", e.getMessage());
return;
}
@@ -68,7 +69,8 @@ public class ProcedureParameterTests {
try {
ProcedureParameter.convertStaticParameters(procedureParameters);
- } catch(IllegalArgumentException e) {
+ }
+ catch(IllegalArgumentException e) {
assertEquals("'procedureParameters' must not contain null values.", e.getMessage());
return;
}
@@ -85,7 +87,8 @@ public class ProcedureParameterTests {
try {
ProcedureParameter.convertExpressions(procedureParameters);
- } catch(IllegalArgumentException e) {
+ }
+ catch(IllegalArgumentException e) {
assertEquals("'procedureParameters' must not contain null values.", e.getMessage());
return;
}
diff --git a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/User.java b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/User.java
index b42dba3777..f688e69922 100644
--- a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/User.java
+++ b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/User.java
@@ -22,9 +22,9 @@ package org.springframework.integration.jdbc.storedproc;
*
*/
public class User {
- private String username;
- private String password;
- private String email;
+ private final String username;
+ private final String password;
+ private final String email;
public User(String username, String password, String email) {
super();
@@ -65,31 +65,40 @@ public class User {
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
User other = (User) obj;
if (email == null) {
- if (other.email != null)
+ if (other.email != null) {
return false;
+ }
}
- else if (!email.equals(other.email))
+ else if (!email.equals(other.email)) {
return false;
+ }
if (password == null) {
- if (other.password != null)
+ if (other.password != null) {
return false;
+ }
}
- else if (!password.equals(other.password))
+ else if (!password.equals(other.password)) {
return false;
+ }
if (username == null) {
- if (other.username != null)
+ if (other.username != null) {
return false;
+ }
}
- else if (!username.equals(other.username))
+ else if (!username.equals(other.username)) {
return false;
+ }
return true;
}
diff --git a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/derby/DerbyStoredProcedures.java b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/derby/DerbyStoredProcedures.java
index c8e52174c5..2522041340 100644
--- a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/derby/DerbyStoredProcedures.java
+++ b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/storedproc/derby/DerbyStoredProcedures.java
@@ -51,7 +51,8 @@ public final class DerbyStoredProcedures {
stmt.setString(2, password);
stmt.setString(3, email);
stmt.executeUpdate();
- } finally {
+ }
+ finally {
JdbcUtils.closeStatement(stmt);
JdbcUtils.closeConnection(conn);
}
@@ -76,7 +77,8 @@ public final class DerbyStoredProcedures {
stmt2 = conn.prepareStatement("select * from USERS");
returnedData[0] = stmt2.executeQuery();
- } finally {
+ }
+ finally {
JdbcUtils.closeConnection(conn);
}
diff --git a/spring-integration-jms/src/main/java/org/springframework/integration/jms/config/JmsNamespaceHandler.java b/spring-integration-jms/src/main/java/org/springframework/integration/jms/config/JmsNamespaceHandler.java
index 8da780cdf0..2c0a7716dc 100644
--- a/spring-integration-jms/src/main/java/org/springframework/integration/jms/config/JmsNamespaceHandler.java
+++ b/spring-integration-jms/src/main/java/org/springframework/integration/jms/config/JmsNamespaceHandler.java
@@ -21,7 +21,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa
/**
* Namespace handler for Spring Integration's jms namespace.
- *
+ *
* @author Mark Fisher
*/
public class JmsNamespaceHandler extends AbstractIntegrationNamespaceHandler {
diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/StubTextMessage.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/StubTextMessage.java
index 823d9d441c..e4a5450d1b 100644
--- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/StubTextMessage.java
+++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/StubTextMessage.java
@@ -25,7 +25,7 @@ import javax.jms.TextMessage;
/**
* Stub JMS Message implementation intended for testing purposes only.
- *
+ *
* @author Mark Fisher
*/
public class StubTextMessage implements TextMessage {
@@ -35,7 +35,7 @@ public class StubTextMessage implements TextMessage {
private String text;
private int deliveryMode = DEFAULT_DELIVERY_MODE;
-
+
private Destination destination;
private String correlationId;
diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/SubscribableJmsChannelTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/SubscribableJmsChannelTests.java
index 7fd007a12e..6a81b469d0 100644
--- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/SubscribableJmsChannelTests.java
+++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/SubscribableJmsChannelTests.java
@@ -401,7 +401,8 @@ public class SubscribableJmsChannelTests {
}
try {
Thread.sleep(100);
- } catch (InterruptedException e) { }
+ }
+ catch (InterruptedException e) { }
timeout -= 100;
}
return false;
diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/config/ExceptionHandlingSiConsumerTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/config/ExceptionHandlingSiConsumerTests.java
index d83cedd665..06254740bf 100644
--- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/config/ExceptionHandlingSiConsumerTests.java
+++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/config/ExceptionHandlingSiConsumerTests.java
@@ -38,7 +38,7 @@ import org.springframework.jms.core.MessageCreator;
* @author Oleg Zhurakousky
*/
public class ExceptionHandlingSiConsumerTests {
-
+
@Test
public void nonSiProducer_siConsumer_sync_withReturn() throws Exception {
ActiveMqTestUtils.prepare();
@@ -47,7 +47,7 @@ public class ExceptionHandlingSiConsumerTests {
Destination request = applicationContext.getBean("requestQueueA", Destination.class);
final Destination reply = applicationContext.getBean("replyQueueA", Destination.class);
jmsTemplate.send(request, new MessageCreator() {
-
+
public Message createMessage(Session session) throws JMSException {
TextMessage message = session.createTextMessage();
message.setText("echoChannel");
@@ -57,10 +57,10 @@ public class ExceptionHandlingSiConsumerTests {
});
Message message = jmsTemplate.receive(reply);
assertNotNull(message);
- applicationContext.close();
+ applicationContext.close();
}
- @Test
+ @Test
public void nonSiProducer_siConsumer_sync_withReturnNoException() throws Exception {
ActiveMqTestUtils.prepare();
ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext("Exception-nonSiProducer-siConsumer.xml", ExceptionHandlingSiConsumerTests.class);
@@ -68,7 +68,7 @@ public class ExceptionHandlingSiConsumerTests {
Destination request = applicationContext.getBean("requestQueueB", Destination.class);
final Destination reply = applicationContext.getBean("replyQueueB", Destination.class);
jmsTemplate.send(request, new MessageCreator() {
-
+
public Message createMessage(Session session) throws JMSException {
TextMessage message = session.createTextMessage();
message.setText("echoWithExceptionChannel");
@@ -79,10 +79,10 @@ public class ExceptionHandlingSiConsumerTests {
Message message = jmsTemplate.receive(reply);
assertNotNull(message);
assertEquals("echoWithException", ((TextMessage) message).getText());
- applicationContext.close();
+ applicationContext.close();
}
- @Test
+ @Test
public void nonSiProducer_siConsumer_sync_withOutboundGateway() throws Exception{
ActiveMqTestUtils.prepare();
final ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext("Exception-nonSiProducer-siConsumer.xml", ExceptionHandlingSiConsumerTests.class);
diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineJmsTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineJmsTests.java
index 83da86692d..4528a43ff1 100644
--- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineJmsTests.java
+++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineJmsTests.java
@@ -166,11 +166,14 @@ public class PipelineJmsTests extends ActiveMQMultiContextTests {
try {
assertEquals(y, gateway.exchange(new GenericMessage(y)).getPayload());
successCounter.incrementAndGet();
- } catch (MessageTimeoutException e) {
+ }
+ catch (MessageTimeoutException e) {
timeoutCounter.incrementAndGet();
- } catch (Throwable t) {
+ }
+ catch (Throwable t) {
failureCounter.incrementAndGet();
- } finally {
+ }
+ finally {
latch.countDown();
}
}
diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithCachedConsumersTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithCachedConsumersTests.java
index bc9d78f9f7..3f51c921dc 100644
--- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithCachedConsumersTests.java
+++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithCachedConsumersTests.java
@@ -216,7 +216,8 @@ public class RequestReplyScenariosWithCachedConsumersTests extends ActiveMQMulti
for (int i = 0; i < 3; i++) {
try {
gateway.exchange(gateway.exchange(new GenericMessage("foo")));
- } catch (Exception e) {/*ignore*/}
+ }
+ catch (Exception e) {/*ignore*/}
}
@@ -237,7 +238,8 @@ public class RequestReplyScenariosWithCachedConsumersTests extends ActiveMQMulti
replyMessage.setJMSCorrelationID(message.getJMSCorrelationID());
MessageProducer producer = session.createProducer(replyDestination);
producer.send(replyMessage);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
// ignore. the test will fail
}
}
@@ -264,7 +266,8 @@ public class RequestReplyScenariosWithCachedConsumersTests extends ActiveMQMulti
private Object extractPayload(Message jmsMessage) {
try {
return converter.fromMessage(jmsMessage);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
fail();
}
diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithCorrelationKeyProvidedTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithCorrelationKeyProvidedTests.java
index 652c5aa6ec..f0d99e2b59 100644
--- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithCorrelationKeyProvidedTests.java
+++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithCorrelationKeyProvidedTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -91,7 +91,8 @@ public class RequestReplyScenariosWithCorrelationKeyProvidedTests extends Active
for (int i = 0; i < 3; i++) {
try {
gateway.exchange(MessageBuilder.withPayload("hello").build());
- } catch (Exception e) {
+ }
+ catch (Exception e) {
// ignore
}
}
diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithTempReplyQueuesTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithTempReplyQueuesTests.java
index 1b8ddccf1e..85126365be 100644
--- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithTempReplyQueuesTests.java
+++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/RequestReplyScenariosWithTempReplyQueuesTests.java
@@ -83,7 +83,8 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
Destination replyTo = null;
try {
replyTo = requestMessage.getJMSReplyTo();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
fail();
}
jmsTemplate.send(replyTo, new MessageCreator() {
@@ -94,7 +95,8 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
message.setText("bar");
message.setJMSCorrelationID(requestMessage.getJMSMessageID());
return message;
- } catch (Exception e) {
+ }
+ catch (Exception e) {
// ignore
}
return null;
@@ -125,14 +127,16 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
Destination replyTo = null;
try {
replyTo = message.getJMSReplyTo();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
fail();
}
String requestPayload = (String) extractPayload(message);
if (requestPayload.equals("foo")){
try {
Thread.sleep(6000);
- } catch (Exception e) {/*ignore*/}
+ }
+ catch (Exception e) {/*ignore*/}
}
try {
TextMessage replyMessage = session.createTextMessage();
@@ -140,7 +144,8 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
replyMessage.setJMSCorrelationID(message.getJMSMessageID());
MessageProducer producer = session.createProducer(replyTo);
producer.send(replyMessage);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
// ignore. the test will fail
}
}
@@ -150,13 +155,15 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
try {
gateway.exchange(new GenericMessage("foo"));
- } catch (Exception e) {
+ }
+ catch (Exception e) {
// ignore
}
Thread.sleep(1000);
try {
assertEquals("bar", gateway.exchange(new GenericMessage("bar")).getPayload());
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
fail();
}
@@ -188,7 +195,8 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
try {
assertEquals(i+"", gateway.exchange(new GenericMessage(String.valueOf(i))).getPayload());
replyCounter++;
- } catch (Exception e) {
+ }
+ catch (Exception e) {
timeoutCounter++;
}
if (i == 0 || i == 20 || i == 40){
@@ -223,7 +231,8 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
if (!String.valueOf(y).equals(reply)){
missmatches.incrementAndGet();
}
- } catch (Exception e) {
+ }
+ catch (Exception e) {
if (e instanceof MessageDeliveryException) {
timeouts.incrementAndGet();
}
@@ -274,7 +283,8 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
private Object extractPayload(Message jmsMessage) {
try {
return converter.fromMessage(jmsMessage);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
fail();
}
diff --git a/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/DefaultNotificationMapper.java b/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/DefaultNotificationMapper.java
index e22b52fad0..ebe650c952 100644
--- a/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/DefaultNotificationMapper.java
+++ b/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/DefaultNotificationMapper.java
@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
* If the Message has a String-typed payload, that will be passed as the 'message' of
* the Notification instance. Otherwise, the payload object will be passed as the
* 'userData' of the Notification instance.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/JmxHeaders.java b/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/JmxHeaders.java
index dd7fc10293..ae914aff13 100644
--- a/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/JmxHeaders.java
+++ b/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/JmxHeaders.java
@@ -18,7 +18,7 @@ package org.springframework.integration.jmx;
/**
* Constants for JMX related Message Header keys.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/MBeanAttributeFilterTests.java b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/MBeanAttributeFilterTests.java
index 44f61a7921..202f9c4016 100644
--- a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/MBeanAttributeFilterTests.java
+++ b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/MBeanAttributeFilterTests.java
@@ -68,7 +68,7 @@ public class MBeanAttributeFilterTests {
@Test
public void testAttributeFilter() {
while (channel.receive(0) != null) {
- ;
+ // drain
}
adapter.start();
@@ -94,7 +94,7 @@ public class MBeanAttributeFilterTests {
@Test
public void testAttributeFilterNot() {
while (channel.receive(0) != null) {
- ;
+ // drain
}
adapterNot.start();
diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/NotificationPublishingMessageHandlerTests.java b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/NotificationPublishingMessageHandlerTests.java
index 8c07b52670..2b79d9eea4 100644
--- a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/NotificationPublishingMessageHandlerTests.java
+++ b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/NotificationPublishingMessageHandlerTests.java
@@ -57,11 +57,11 @@ public class NotificationPublishingMessageHandlerTests {
// should not fail INT-1816
context.registerSingleton("exporter", IntegrationMBeanExporter.class);
context.registerSingleton("anotherExporter", MBeanExporter.class);
-
+
RootBeanDefinition publisherDefinition = new RootBeanDefinition(NotificationPublishingMessageHandler.class);
publisherDefinition.getConstructorArgumentValues().addGenericArgumentValue(this.publisherObjectName);
publisherDefinition.getPropertyValues().add("defaultNotificationType", "test.type");
- context.registerBeanDefinition("testPublisher", publisherDefinition);
+ context.registerBeanDefinition("testPublisher", publisherDefinition);
context.refresh();
MBeanExporter exporter = context.getBean(IntegrationMBeanExporter.class);
exporter.getServer().addNotificationListener(publisherObjectName, this.listener, null, null);
diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/MBeanAutoDetectTests.java b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/MBeanAutoDetectTests.java
index b96c5e6ebc..14f9282714 100644
--- a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/MBeanAutoDetectTests.java
+++ b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/MBeanAutoDetectTests.java
@@ -54,7 +54,7 @@ public class MBeanAutoDetectTests {
new ObjectName("test.MBeanAutoDetectFirst:type=ExpressionEvaluatingRouter,*"), null);
assertEquals(1, names.size());
}
-
+
@Test
@Ignore // Fails because the MBeanExporter is created before the router
public void testRouterMBeanExistsWhenDefinedSecond() throws Exception {
@@ -65,5 +65,5 @@ public class MBeanAutoDetectTests {
new ObjectName("test.MBeanAutoDetectFirst:type=ExpressionEvaluatingRouter,*"), null);
assertEquals(1, names.size());
}
-
+
}
diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/SimpleDynamicRouter.java b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/SimpleDynamicRouter.java
index 341f801faf..c685046cdf 100644
--- a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/SimpleDynamicRouter.java
+++ b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/SimpleDynamicRouter.java
@@ -28,14 +28,14 @@ import org.springframework.util.Assert;
*
*/
/**
- *
+ *
*
*/
@ManagedResource
public class SimpleDynamicRouter{
private final Map channelMappings = new HashMap();
/**
- *
+ *
* @param channelMappings
*/
public SimpleDynamicRouter(Map channelMappings){
@@ -45,7 +45,7 @@ public class SimpleDynamicRouter{
}
}
/**
- *
+ *
* @param key
* @param channelName
*/
@@ -54,20 +54,20 @@ public class SimpleDynamicRouter{
this.channelMappings.put(key, channelName);
}
/**
- *
+ *
* @param key
*/
public void removeChannelMapping(String key){
this.channelMappings.remove(key);
}
/**
- *
+ *
*/
public Map getChannelMappings(){
return channelMappings;
}
/**
- *
+ *
* @param key
*/
public String route(Object key){
diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/HandlerMonitoringIntegrationTests.java b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/HandlerMonitoringIntegrationTests.java
index c23184bedf..47eab1cd33 100644
--- a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/HandlerMonitoringIntegrationTests.java
+++ b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/HandlerMonitoringIntegrationTests.java
@@ -91,7 +91,8 @@ public class HandlerMonitoringIntegrationTests {
int count = messageHandlersMonitor.getHandlerDuration(monitor).getCount();
assertTrue("No statistics for input channel", count > 0);
- } finally {
+ }
+ finally {
context.close();
}
diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageMetricsAdviceTests.java b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageMetricsAdviceTests.java
index 8b348aa4c6..4d92a171cd 100644
--- a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageMetricsAdviceTests.java
+++ b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageMetricsAdviceTests.java
@@ -112,7 +112,7 @@ public class MessageMetricsAdviceTests {
public void handleMessage(Message> message) throws MessagingException {
invoked = true;
}
-
+
}
private static class DummyInterceptor implements MethodInterceptor {
@@ -129,7 +129,7 @@ public class MessageMetricsAdviceTests {
public String toString() {
return super.toString() + "{" + "invoked=" + invoked + '}';
}
-
+
}
-
+
}
diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageSourceMonitoringIntegrationTests.java b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageSourceMonitoringIntegrationTests.java
index 5c3df15bce..3132e74c58 100644
--- a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageSourceMonitoringIntegrationTests.java
+++ b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageSourceMonitoringIntegrationTests.java
@@ -65,7 +65,8 @@ public class MessageSourceMonitoringIntegrationTests {
int count = exporter.getSourceMessageCount(monitor);
assertTrue("No statistics for input channel", count > 0);
- } finally {
+ }
+ finally {
context.close();
}
diff --git a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/config/xml/JpaParserUtils.java b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/config/xml/JpaParserUtils.java
index 23f29d340c..59538e940d 100644
--- a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/config/xml/JpaParserUtils.java
+++ b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/config/xml/JpaParserUtils.java
@@ -197,7 +197,8 @@ public final class JpaParserUtils {
parameterBuilder.addPropertyValue("value",
new TypedStringValue(value, String.class));
- } else {
+ }
+ else {
parameterBuilder.addPropertyValue("value",
new TypedStringValue(value, type));
}
diff --git a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/DefaultJpaOperations.java b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/DefaultJpaOperations.java
index 3584f87a20..4ca41cb4ff 100644
--- a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/DefaultJpaOperations.java
+++ b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/DefaultJpaOperations.java
@@ -69,7 +69,8 @@ public class DefaultJpaOperations extends AbstractJpaOperations {
for (Object object : entities) {
if (entityClass == null) {
entityClass = object.getClass();
- } else {
+ }
+ else {
if (entityClass != object.getClass()) {
throw new IllegalArgumentException("entities must be of the same type.");
}
@@ -159,7 +160,8 @@ public class DefaultJpaOperations extends AbstractJpaOperations {
if (entityClass == null) {
query = entityManager.createNativeQuery(selectQuery);
- } else {
+ }
+ else {
query = entityManager.createNativeQuery(selectQuery, entityClass);
}
@@ -307,27 +309,29 @@ public class DefaultJpaOperations extends AbstractJpaOperations {
if (source instanceof PositionSupportingParameterSource) {
paramValue = ((PositionSupportingParameterSource) source).getValueByPosition(position - 1);
query.setParameter(position, paramValue);
- } else {
+ }
+ else {
throw new JpaOperationFailedException("Positional Parameters are only support "
- + "for PositionSupportingParameterSources.")
- .withOffendingJPAQl(queryString);
+ + "for PositionSupportingParameterSources.", queryString);
}
- } else {
+ }
+ else {
if(StringUtils.hasText(paramName)) {
paramValue = source.getValue(paramName);
query.setParameter(paramName, paramValue);
- } else {
+ }
+ else {
throw new JpaOperationFailedException(
"This parameter does not contain a parameter name. " +
- "Additionally it is not a postitional parameter, neither.")
- .withOffendingJPAQl(queryString);
+ "Additionally it is not a postitional parameter, neither.", queryString);
}
}
}
- } else {
+ }
+ else {
throw new IllegalArgumentException("Query has parameters but no parameter source provided");
}
diff --git a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/JpaOperationFailedException.java b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/JpaOperationFailedException.java
index 39b2e62f91..dcc6a78f1b 100644
--- a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/JpaOperationFailedException.java
+++ b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/JpaOperationFailedException.java
@@ -20,50 +20,23 @@ package org.springframework.integration.jpa.core;
* An Exception that would be thrown if any of the Operations from {@link JpaOperations} fails
*
* @author Amol Nayak
+ * @author Gary Russell
* @since 2.2
*
*/
public class JpaOperationFailedException extends RuntimeException {
- /**
- *
- */
private static final long serialVersionUID = 1L;
- private String offendingJPAQl;
+ private final String offendingJPAQl;
- public JpaOperationFailedException() {
- super();
- }
-
- public JpaOperationFailedException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public JpaOperationFailedException(String message) {
+ public JpaOperationFailedException(String message, String offendingJPAQ1) {
super(message);
- }
-
- public JpaOperationFailedException(Throwable cause) {
- super(cause);
- }
-
- /**
- * If execution of a JPA QL fails, we can set that query using this convenience method.
- *
- * @param offendingJPAQl The offending query.
- * @return this.
- */
- public JpaOperationFailedException withOffendingJPAQl(String offendingJPAQl) {
- setOffendingJPAQl(offendingJPAQl);
- return this;
+ this.offendingJPAQl = offendingJPAQ1;
}
public String getOffendingJPAQl() {
return this.offendingJPAQl;
}
- public void setOffendingJPAQl(String offendingJPAQl) {
- this.offendingJPAQl = offendingJPAQl;
- }
}
diff --git a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/outbound/JpaOutboundGateway.java b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/outbound/JpaOutboundGateway.java
index 5f722ac433..a004282b9a 100644
--- a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/outbound/JpaOutboundGateway.java
+++ b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/outbound/JpaOutboundGateway.java
@@ -76,9 +76,11 @@ public class JpaOutboundGateway extends AbstractReplyProducingMessageHandler {
final Object result;
if (OutboundGatewayType.RETRIEVING.equals(this.gatewayType)) {
result = this.jpaExecutor.poll(requestMessage);
- } else if (OutboundGatewayType.UPDATING.equals(this.gatewayType)) {
+ }
+ else if (OutboundGatewayType.UPDATING.equals(this.gatewayType)) {
result = this.jpaExecutor.executeOutboundJpaOperation(requestMessage);
- } else {
+ }
+ else {
throw new IllegalArgumentException(String.format("GatewayType '%s' is not supported.", this.gatewayType));
}
diff --git a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/outbound/package-info.java b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/outbound/package-info.java
index ddef4cbaa6..f384362c2d 100644
--- a/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/outbound/package-info.java
+++ b/spring-integration-jpa/src/main/java/org/springframework/integration/jpa/outbound/package-info.java
@@ -1,4 +1,4 @@
/**
- * Provides Spring Integration components for doing outbound operations.
+ * Provides Spring Integration components for doing outbound operations.
*/
package org.springframework.integration.jpa.outbound;
diff --git a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/config/xml/JpaOutboundGatewayParserTests.java b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/config/xml/JpaOutboundGatewayParserTests.java
index d1b7232c7f..74ddb67f30 100644
--- a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/config/xml/JpaOutboundGatewayParserTests.java
+++ b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/config/xml/JpaOutboundGatewayParserTests.java
@@ -205,7 +205,8 @@ public class JpaOutboundGatewayParserTests extends AbstractRequestHandlerAdvice
public void withBothFirstResultAndFirstResultExpressionPresent() {
try {
this.context = new ClassPathXmlApplicationContext("JpaInvalidOutboundGatewayParserTests.xml", getClass());
- } catch (BeanDefinitionStoreException e) {
+ }
+ catch (BeanDefinitionStoreException e) {
assertTrue(e.getMessage().startsWith("Configuration problem: Only one of 'first-result' or 'first-result-expression' is allowed"));
return;
}
diff --git a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/EclipseLinkJpaOperationsTests.java b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/EclipseLinkJpaOperationsTests.java
index 1a448e6136..927b22ab48 100644
--- a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/EclipseLinkJpaOperationsTests.java
+++ b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/EclipseLinkJpaOperationsTests.java
@@ -51,7 +51,8 @@ public class EclipseLinkJpaOperationsTests extends AbstractJpaOperationsTests {
try {
super.testExecuteUpdateWithNativeQuery();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
return;
}
@@ -64,7 +65,8 @@ public class EclipseLinkJpaOperationsTests extends AbstractJpaOperationsTests {
try {
super.testExecuteUpdateWithNativeNamedQuery();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
return;
}
diff --git a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/OpenJpaJpaOperationsTests.java b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/OpenJpaJpaOperationsTests.java
index f5650deb50..d992987405 100644
--- a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/OpenJpaJpaOperationsTests.java
+++ b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/OpenJpaJpaOperationsTests.java
@@ -60,7 +60,8 @@ public class OpenJpaJpaOperationsTests extends AbstractJpaOperationsTests {
try {
super.testExecuteUpdateWithNativeQuery();
- } catch (PersistenceException e) {
+ }
+ catch (PersistenceException e) {
return;
}
@@ -73,7 +74,8 @@ public class OpenJpaJpaOperationsTests extends AbstractJpaOperationsTests {
try {
super.testExecuteUpdateWithNativeNamedQuery();
- } catch (InvalidStateException e) {
+ }
+ catch (InvalidStateException e) {
return;
}
@@ -108,7 +110,8 @@ public class OpenJpaJpaOperationsTests extends AbstractJpaOperationsTests {
try {
return MappingTool.run(conf, args, opts);
- } finally {
+ }
+ finally {
conf.close();
}
}
diff --git a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests.java b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests.java
index 8652214612..cceb3c474e 100644
--- a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests.java
+++ b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests.java
@@ -86,7 +86,8 @@ public class JpaOutboundGatewayTests {
try {
studentService.deleteStudent(student);
- } catch (IllegalArgumentException e) {
+ }
+ catch (IllegalArgumentException e) {
return;
}
@@ -97,7 +98,8 @@ public class JpaOutboundGatewayTests {
public void getStudentWithException() {
try {
studentService.getStudentWithException(1001L);
- } catch (MessagingException e) {
+ }
+ catch (MessagingException e) {
Assert.assertEquals("The Jpa operation returned more than 1 result object but expectSingleResult was 'true'.",
e.getMessage());
diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/MailHeaders.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/MailHeaders.java
index 59c5c7cc5d..d069e41ac9 100644
--- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/MailHeaders.java
+++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/MailHeaders.java
@@ -19,7 +19,7 @@ package org.springframework.integration.mail;
/**
* Pre-defined header names to be used for setting and/or retrieving Mail
* Message attributes from/to integration Message Headers.
- *
+ *
* @author Mark Fisher
*/
public abstract class MailHeaders {
@@ -41,7 +41,7 @@ public abstract class MailHeaders {
public static final String MULTIPART_MODE = PREFIX + "multipartMode";
public static final String ATTACHMENT_FILENAME = PREFIX + "attachmentFilename";
-
+
public static final String CONTENT_TYPE = PREFIX + "contentType";
}
diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/MailSendingMessageHandler.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/MailSendingMessageHandler.java
index b10261511e..575f88ea6b 100644
--- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/MailSendingMessageHandler.java
+++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/MailSendingMessageHandler.java
@@ -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.
@@ -199,7 +199,8 @@ public class MailSendingMessageHandler extends AbstractMessageHandler {
if (value != null) {
if (value instanceof String[]) {
returnedHeaders = (String[]) value;
- } else if (value instanceof String) {
+ }
+ else if (value instanceof String) {
returnedHeaders = StringUtils.commaDelimitedListToStringArray((String) value);
}
}
diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/Pop3MailReceiver.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/Pop3MailReceiver.java
index 0701235f8a..9f34f12245 100755
--- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/Pop3MailReceiver.java
+++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/Pop3MailReceiver.java
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
/**
* A {@link MailReceiver} implementation that polls a mail server using the
* POP3 protocol.
- *
+ *
* @author Arjen Poutsma
* @author Mark Fisher
*/
diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailNamespaceHandler.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailNamespaceHandler.java
index c55db32dde..1e59396bfd 100644
--- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailNamespaceHandler.java
+++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailNamespaceHandler.java
@@ -20,7 +20,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa
/**
* Namespace handler for the 'mail' namespace.
- *
+ *
* @author Mark Fisher
*/
public class MailNamespaceHandler extends AbstractIntegrationNamespaceHandler {
diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParser.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParser.java
index e8e6318054..0a20f3dce2 100644
--- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParser.java
+++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParser.java
@@ -30,8 +30,8 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
- * Parser for the <outbound-channel-adapter/> element of the 'mail' namespace.
- *
+ * Parser for the <outbound-channel-adapter/> element of the 'mail' namespace.
+ *
* @author Mark Fisher
*/
public class MailOutboundChannelAdapterParser extends AbstractOutboundChannelAdapterParser {
@@ -66,7 +66,7 @@ public class MailOutboundChannelAdapterParser extends AbstractOutboundChannelAda
}
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(
mailSenderBuilder, element, "java-mail-properties", "javaMailProperties");
-
+
String mailSenderBeanName = BeanDefinitionReaderUtils.registerWithGeneratedName(
mailSenderBuilder.getBeanDefinition(), parserContext.getRegistry());
builder.addConstructorArgReference(mailSenderBeanName);
diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailToStringTransformerParser.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailToStringTransformerParser.java
index b7cd9277d7..35cad49366 100644
--- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailToStringTransformerParser.java
+++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/config/MailToStringTransformerParser.java
@@ -25,7 +25,7 @@ import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
/**
* Parser for the <mail-to-string-transformer> element.
- *
+ *
* @author Mark Fisher
*/
public class MailToStringTransformerParser extends AbstractTransformerParser {
diff --git a/spring-integration-mail/src/test/java/org/springframework/integration/mail/ImapMailReceiverTests.java b/spring-integration-mail/src/test/java/org/springframework/integration/mail/ImapMailReceiverTests.java
index 9db5d93922..f5277c6317 100644
--- a/spring-integration-mail/src/test/java/org/springframework/integration/mail/ImapMailReceiverTests.java
+++ b/spring-integration-mail/src/test/java/org/springframework/integration/mail/ImapMailReceiverTests.java
@@ -808,7 +808,8 @@ public class ImapMailReceiverTests {
public void run(){
try {
receiver.receive();
- } catch (javax.mail.MessagingException e) {
+ }
+ catch (javax.mail.MessagingException e) {
if (e.getCause() instanceof NullPointerException){
e.printStackTrace();
failed.getAndIncrement();
@@ -823,7 +824,8 @@ public class ImapMailReceiverTests {
public void run(){
try {
receiver.destroy();
- } catch (Exception ignore) {
+ }
+ catch (Exception ignore) {
// ignore
ignore.printStackTrace();
}
@@ -918,7 +920,7 @@ public class ImapMailReceiverTests {
}
- };
+ }
ImapMailReceiver receiver = new TestReceiver();
Message[] received = receiver.receive();
assertEquals(1, received.length);
diff --git a/spring-integration-mail/src/test/java/org/springframework/integration/mail/MailSendingMessageHandlerContextTests.java b/spring-integration-mail/src/test/java/org/springframework/integration/mail/MailSendingMessageHandlerContextTests.java
index 6c5f6bd3fb..8178c9462a 100644
--- a/spring-integration-mail/src/test/java/org/springframework/integration/mail/MailSendingMessageHandlerContextTests.java
+++ b/spring-integration-mail/src/test/java/org/springframework/integration/mail/MailSendingMessageHandlerContextTests.java
@@ -145,7 +145,7 @@ public class MailSendingMessageHandlerContextTests {
catch (Exception e) {
assertThat(e, instanceOf(MessageHandlingException.class));
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
- assertThat(e.getMessage(),
+ assertThat(e.getMessage(),
containsString("this adapter requires a 'JavaMailSender' to send a 'MimeMailMessage'"));
}
@@ -159,7 +159,7 @@ public class MailSendingMessageHandlerContextTests {
catch (Exception e) {
assertThat(e, instanceOf(MessageHandlingException.class));
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
- assertThat(e.getMessage(),
+ assertThat(e.getMessage(),
containsString("this adapter requires a 'JavaMailSender' to send a 'MimeMailMessage'"));
}
@@ -170,7 +170,7 @@ public class MailSendingMessageHandlerContextTests {
catch (Exception e) {
assertThat(e, instanceOf(MessageHandlingException.class));
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
- assertThat(e.getMessage(),
+ assertThat(e.getMessage(),
containsString("this adapter requires a 'JavaMailSender' to send a 'MimeMailMessage'"));
}
}
diff --git a/spring-integration-mail/src/test/java/org/springframework/integration/mail/MailSendingMessageHandlerTests.java b/spring-integration-mail/src/test/java/org/springframework/integration/mail/MailSendingMessageHandlerTests.java
index 43d9011bf7..fda17446ba 100644
--- a/spring-integration-mail/src/test/java/org/springframework/integration/mail/MailSendingMessageHandlerTests.java
+++ b/spring-integration-mail/src/test/java/org/springframework/integration/mail/MailSendingMessageHandlerTests.java
@@ -38,7 +38,7 @@ import org.springframework.mail.SimpleMailMessage;
* @author Marius Bogoevici
* @author Oleg Zhurakousky
*/
-public class MailSendingMessageHandlerTests {
+public class MailSendingMessageHandlerTests {
private MailSendingMessageHandler handler;
@@ -50,7 +50,7 @@ public class MailSendingMessageHandlerTests {
this.mailSender = new StubJavaMailSender(new MimeMessage((Session) null));
this.handler = new MailSendingMessageHandler(this.mailSender);
}
-
+
@After
public void reset() {
this.mailSender.reset();
diff --git a/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/rules/MongoDbAvailable.java b/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/rules/MongoDbAvailable.java
index ec02a79473..2137a78663 100644
--- a/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/rules/MongoDbAvailable.java
+++ b/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/rules/MongoDbAvailable.java
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Annotation used for any test method that requires a running MongoDb process.
- *
+ *
* @author Oleg Zhurakousky
* @since 2.1
*/
diff --git a/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/outbound/package-info.java b/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/outbound/package-info.java
index 6b5d4e40b1..501821f9c0 100644
--- a/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/outbound/package-info.java
+++ b/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/outbound/package-info.java
@@ -1,4 +1,4 @@
/**
- * Provides Spring Integration components for doing outbound operations.
+ * Provides Spring Integration components for doing outbound operations.
*/
package org.springframework.integration.mqtt.outbound;
diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/util/RedisLockRegistry.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/util/RedisLockRegistry.java
index b3c47f23fb..c13b262cfc 100644
--- a/spring-integration-redis/src/main/java/org/springframework/integration/redis/util/RedisLockRegistry.java
+++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/util/RedisLockRegistry.java
@@ -427,7 +427,8 @@ public final class RedisLockRegistry implements LockRegistry {
});
- } finally {
+ }
+ finally {
if (!success) {
this.lockedAt = 0;
@@ -486,7 +487,8 @@ public final class RedisLockRegistry implements LockRegistry {
if (logger.isDebugEnabled()) {
logger.debug("Released lock; " + this.toString());
}
- } finally {
+ }
+ finally {
this.thread = null;
this.reLock = 0;
toWeakThreadStorage(this);
diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpointTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpointTests.java
index 6f29a6a7b1..d91dc31d9a 100644
--- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpointTests.java
+++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpointTests.java
@@ -232,7 +232,9 @@ public class RedisQueueMessageDrivenEndpointTests extends RedisAvailableTests {
redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer());
redisTemplate.afterPropertiesSet();
- while (redisTemplate.boundListOps(queueName).rightPop() != null) {}
+ while (redisTemplate.boundListOps(queueName).rightPop() != null) {
+ // drain
+ }
RedisQueueMessageDrivenEndpoint endpoint = new RedisQueueMessageDrivenEndpoint(queueName,
this.connectionFactory);
diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java
index 4246ab0e7d..9b0db8b3ea 100644
--- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java
+++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java
@@ -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.
@@ -108,7 +108,7 @@ public class RedisAvailableTests {
private void drain(QueueChannel channel) {
while (channel.receive(0) != null) {
- ;
+ // drain
}
}
diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/util/RedisLockRegistryTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/util/RedisLockRegistryTests.java
index 829a60a754..b1ec51a68e 100644
--- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/util/RedisLockRegistryTests.java
+++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/util/RedisLockRegistryTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2015 the original author or authors.
+ * Copyright 2014-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.
@@ -119,7 +119,7 @@ public class RedisLockRegistryTests extends RedisAvailableTests {
assertSame(lock1, lock2);
lock2.lock();
try {
-
+ // just get the lock
}
finally {
lock2.unlock();
@@ -144,7 +144,7 @@ public class RedisLockRegistryTests extends RedisAvailableTests {
assertSame(lock1, lock2);
lock2.lockInterruptibly();
try {
-
+ // just get the lock
}
finally {
lock2.unlock();
@@ -169,7 +169,7 @@ public class RedisLockRegistryTests extends RedisAvailableTests {
assertNotSame(lock1, lock2);
lock2.lockInterruptibly();
try {
-
+ // just get the lock
}
finally {
lock2.unlock();
diff --git a/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiNamespaceHandler.java b/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiNamespaceHandler.java
index 352ec5835d..8c502eab6c 100644
--- a/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiNamespaceHandler.java
+++ b/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiNamespaceHandler.java
@@ -20,7 +20,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa
/**
* Namespace handler for Spring Integration's rmi namespace.
- *
+ *
* @author Mark Fisher
*/
public class RmiNamespaceHandler extends AbstractIntegrationNamespaceHandler {
diff --git a/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParser.java b/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParser.java
index 982eabc72b..0cd2b1b481 100644
--- a/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParser.java
+++ b/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParser.java
@@ -26,8 +26,8 @@ import org.springframework.integration.rmi.RmiInboundGateway;
import org.springframework.util.StringUtils;
/**
- * Parser for the <outbound-gateway/> element of the 'rmi' namespace.
- *
+ * Parser for the <outbound-gateway/> element of the 'rmi' namespace.
+ *
* @author Mark Fisher
*/
public class RmiOutboundGatewayParser extends AbstractOutboundGatewayParser {
diff --git a/spring-integration-scripting/src/main/java/org/springframework/integration/scripting/ScriptingException.java b/spring-integration-scripting/src/main/java/org/springframework/integration/scripting/ScriptingException.java
index ceb7768f1d..e32b74009c 100644
--- a/spring-integration-scripting/src/main/java/org/springframework/integration/scripting/ScriptingException.java
+++ b/spring-integration-scripting/src/main/java/org/springframework/integration/scripting/ScriptingException.java
@@ -25,12 +25,12 @@ import org.springframework.messaging.MessagingException;
@SuppressWarnings("serial")
public class ScriptingException extends MessagingException {
-
+
public ScriptingException(String description) {
super(description);
}
-
-
+
+
public ScriptingException(String description, Throwable cause) {
super(description, cause);
}
diff --git a/spring-integration-scripting/src/main/java/org/springframework/integration/scripting/config/jsr223/ScriptNamespaceHandler.java b/spring-integration-scripting/src/main/java/org/springframework/integration/scripting/config/jsr223/ScriptNamespaceHandler.java
index a90a43871a..5ee60d4506 100644
--- a/spring-integration-scripting/src/main/java/org/springframework/integration/scripting/config/jsr223/ScriptNamespaceHandler.java
+++ b/spring-integration-scripting/src/main/java/org/springframework/integration/scripting/config/jsr223/ScriptNamespaceHandler.java
@@ -25,7 +25,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa
public class ScriptNamespaceHandler extends AbstractIntegrationNamespaceHandler {
public void init() {
- this.registerBeanDefinitionParser("script", new ScriptParser());
+ this.registerBeanDefinitionParser("script", new ScriptParser());
}
}
diff --git a/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/config/jsr223/Jsr223FilterTests.java b/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/config/jsr223/Jsr223FilterTests.java
index 4d22d428b3..1435acb0cf 100644
--- a/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/config/jsr223/Jsr223FilterTests.java
+++ b/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/config/jsr223/Jsr223FilterTests.java
@@ -58,7 +58,7 @@ public class Jsr223FilterTests {
Message> message2 = MessageBuilder.withPayload("test-2")
.setReplyChannel(replyChannel)
.setHeader("type", "good")
- .build();
+ .build();
this.referencedScriptInput.send(message1);
this.referencedScriptInput.send(message2);
assertEquals("test-2", replyChannel.receive(0).getPayload());
@@ -70,7 +70,7 @@ public class Jsr223FilterTests {
QueueChannel replyChannel = new QueueChannel();
replyChannel.setBeanName("returnAddress");
Message> message1 = MessageBuilder.withPayload("bad").setReplyChannel(replyChannel).build();
- Message> message2 = MessageBuilder.withPayload("good").setReplyChannel(replyChannel).build();
+ Message> message2 = MessageBuilder.withPayload("good").setReplyChannel(replyChannel).build();
this.inlineScriptInput.send(message1);
this.inlineScriptInput.send(message2);
Message> received = replyChannel.receive(0);
diff --git a/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/config/jsr223/Jsr223RefreshTests.java b/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/config/jsr223/Jsr223RefreshTests.java
index 6a095e2657..98577caed9 100644
--- a/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/config/jsr223/Jsr223RefreshTests.java
+++ b/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/config/jsr223/Jsr223RefreshTests.java
@@ -63,7 +63,7 @@ public class Jsr223RefreshTests {
super.setValue(new CycleResource());
}
}
-
+
private static class CycleResource extends AbstractResource {
private int count = -1;
@@ -72,12 +72,12 @@ public class Jsr223RefreshTests {
public String getDescription() {
return "CycleResource";
}
-
+
@Override
public String getFilename() throws IllegalStateException {
return "CycleResource";
}
-
+
@Override
public long lastModified() throws IOException {
return -1;
@@ -89,6 +89,6 @@ public class Jsr223RefreshTests {
}
return new ByteArrayInputStream(scripts[count].getBytes());
}
-
+
}
}
diff --git a/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/jsr223/PythonVariableParserTests.java b/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/jsr223/PythonVariableParserTests.java
index e364c7401a..f0cc12440b 100644
--- a/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/jsr223/PythonVariableParserTests.java
+++ b/spring-integration-scripting/src/test/java/org/springframework/integration/scripting/jsr223/PythonVariableParserTests.java
@@ -30,22 +30,22 @@ import org.springframework.scripting.support.ResourceScriptSource;
*
*/
public class PythonVariableParserTests {
-
+
@Test
public void testBasic() throws IOException {
String var = PythonScriptExecutor.PythonVariableParser.parseReturnVariable("x=2");
assertEquals("x",var);
-
+
var = PythonScriptExecutor.PythonVariableParser.parseReturnVariable("\n\n\nx = 2\n\n\n");
assertEquals("x",var);
-
+
var = PythonScriptExecutor.PythonVariableParser.parseReturnVariable("\n\n\nx\n\n\n");
}
-
-
+
+
@Test
public void test2() throws IOException {
- ScriptSource source =
+ ScriptSource source =
new ResourceScriptSource(new ClassPathResource("/org/springframework/integration/scripting/jsr223/test2.py"));
String var = PythonScriptExecutor.PythonVariableParser.parseReturnVariable(source.getScriptAsString());
assertEquals("bar",var);
diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelInvocation.java b/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelInvocation.java
index 44eddf2e34..552d010e73 100644
--- a/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelInvocation.java
+++ b/spring-integration-security/src/main/java/org/springframework/integration/security/channel/ChannelInvocation.java
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
* to the original {@link MethodInvocation} instance and provides convenient
* access to the secured {@link MessageChannel}. If the intercepted invocation
* is a send operation, the {@link Message} is also available.
- *
+ *
* @author Mark Fisher
*/
public class ChannelInvocation {
diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/config/IntegrationSecurityNamespaceHandler.java b/spring-integration-security/src/main/java/org/springframework/integration/security/config/IntegrationSecurityNamespaceHandler.java
index 519d188173..49919adb1f 100644
--- a/spring-integration-security/src/main/java/org/springframework/integration/security/config/IntegrationSecurityNamespaceHandler.java
+++ b/spring-integration-security/src/main/java/org/springframework/integration/security/config/IntegrationSecurityNamespaceHandler.java
@@ -20,7 +20,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa
/**
* Namespace handler for the security namespace.
- *
+ *
* @author Jonas Partner
*/
public class IntegrationSecurityNamespaceHandler extends AbstractIntegrationNamespaceHandler {
diff --git a/spring-integration-security/src/test/java/org/springframework/integration/security/channel/ChannelSecurityInterceptorTests.java b/spring-integration-security/src/test/java/org/springframework/integration/security/channel/ChannelSecurityInterceptorTests.java
index d9af6b26ad..35c66163f9 100644
--- a/spring-integration-security/src/test/java/org/springframework/integration/security/channel/ChannelSecurityInterceptorTests.java
+++ b/spring-integration-security/src/test/java/org/springframework/integration/security/channel/ChannelSecurityInterceptorTests.java
@@ -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.
@@ -84,7 +84,7 @@ public class ChannelSecurityInterceptorTests {
securityMetadataSource.addPatternMapping(Pattern.compile("secured.*"), new DefaultChannelAccessPolicy(role, null));
ChannelSecurityInterceptor interceptor = new ChannelSecurityInterceptor(securityMetadataSource);
AffirmativeBased accessDecisionManager = AffirmativeBased.class.getConstructor(List.class)
- .newInstance(Collections.singletonList(new RoleVoter()));;
+ .newInstance(Collections.singletonList(new RoleVoter()));
accessDecisionManager.afterPropertiesSet();
interceptor.setAccessDecisionManager(accessDecisionManager);
interceptor.setAuthenticationManager(new MockAuthenticationManager(true));
diff --git a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/filters/SftpRegexPatternFileListFilter.java b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/filters/SftpRegexPatternFileListFilter.java
index ed5c4615aa..70c6811c08 100644
--- a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/filters/SftpRegexPatternFileListFilter.java
+++ b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/filters/SftpRegexPatternFileListFilter.java
@@ -25,7 +25,7 @@ import com.jcraft.jsch.ChannelSftp.LsEntry;
/**
* Implementation of {@link AbstractRegexPatternFileListFilter} for SFTP.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/filters/SftpSimplePatternFileListFilter.java b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/filters/SftpSimplePatternFileListFilter.java
index 81cb2b5b20..5a0574e169 100644
--- a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/filters/SftpSimplePatternFileListFilter.java
+++ b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/filters/SftpSimplePatternFileListFilter.java
@@ -23,7 +23,7 @@ import com.jcraft.jsch.ChannelSftp.LsEntry;
/**
* Implementation of {@link AbstractSimplePatternFileListFilter} for SFTP.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundFileSynchronizingMessageSource.java b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundFileSynchronizingMessageSource.java
index 5b30972430..145f22251c 100644
--- a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundFileSynchronizingMessageSource.java
+++ b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundFileSynchronizingMessageSource.java
@@ -38,7 +38,7 @@ public class SftpInboundFileSynchronizingMessageSource extends AbstractInboundFi
public SftpInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer synchronizer) {
super(synchronizer);
}
-
+
public SftpInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer synchronizer, Comparator comparator) {
super(synchronizer, comparator);
}
diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpOutboundTransferSample.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpOutboundTransferSample.java
index ec54f154f1..6f443e4fc8 100644
--- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpOutboundTransferSample.java
+++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpOutboundTransferSample.java
@@ -35,7 +35,7 @@ public class SftpOutboundTransferSample {
@Test
@Ignore
public void testOutbound() throws Exception{
- ClassPathXmlApplicationContext ac =
+ ClassPathXmlApplicationContext ac =
new ClassPathXmlApplicationContext("SftpOutboundTransferSample-ignored.xml", SftpOutboundTransferSample.class);
ac.start();
File file = new File("/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-sftp/local-test-dir/foo.txt");
@@ -47,7 +47,7 @@ public class SftpOutboundTransferSample {
}
System.out.println("Done");
ac.stop();
-
+
}
}
diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java
index ca93f6a06f..39c32d2540 100644
--- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java
+++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java
@@ -198,7 +198,7 @@ public class SftpInboundRemoteFileSystemSynchronizerTests {
throw new RuntimeException("Failed to create mock sftp session", e);
}
}
-
+
}
}
diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpOutboundTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpOutboundTests.java
index d75aacc140..4b0b9ed45b 100644
--- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpOutboundTests.java
+++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpOutboundTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 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.
@@ -418,7 +418,8 @@ public class SftpOutboundTests {
when(jschSession.openChannel("sftp")).thenReturn(channel);
return SftpTestSessionFactory.createSftpSession(jschSession);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
throw new RuntimeException("Failed to create mock sftp session", e);
}
}
diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java
index d7262d2798..ed6a0d705c 100644
--- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java
+++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java
@@ -338,7 +338,9 @@ public class SftpServerOutboundTests {
String dir = "sftpSource/";
this.inboundMGetRecursive.send(new GenericMessage(dir + "*"));
- while (output.receive(0) != null) { }
+ while (output.receive(0) != null) {
+ // drain
+ }
this.inboundMPut.send(new GenericMessage(this.sftpServer.getSourceLocalDirectory()));
@SuppressWarnings("unchecked")
Message> out = (Message>) this.output.receive(1000);
@@ -360,7 +362,9 @@ public class SftpServerOutboundTests {
public void testInt3088MPutRecursive() {
String dir = "sftpSource/";
this.inboundMGetRecursive.send(new GenericMessage(dir + "*"));
- while (output.receive(0) != null) { }
+ while (output.receive(0) != null) {
+ // drain
+ }
this.inboundMPutRecursive.send(new GenericMessage(this.sftpServer.getSourceLocalDirectory()));
@SuppressWarnings("unchecked")
Message> out = (Message>) this.output.receive(1000);
@@ -386,7 +390,9 @@ public class SftpServerOutboundTests {
public void testInt3088MPutRecursiveFiltered() {
String dir = "sftpSource/";
this.inboundMGetRecursive.send(new GenericMessage(dir + "*"));
- while (output.receive(0) != null) { }
+ while (output.receive(0) != null) {
+ // drain
+ }
this.inboundMPutRecursiveFiltered.send(new GenericMessage(this.sftpServer.getSourceLocalDirectory()));
@SuppressWarnings("unchecked")
Message> out = (Message>) this.output.receive(1000);
diff --git a/spring-integration-stream/src/main/java/org/springframework/integration/stream/config/ConsoleInboundChannelAdapterParser.java b/spring-integration-stream/src/main/java/org/springframework/integration/stream/config/ConsoleInboundChannelAdapterParser.java
index 9267852982..a04d302919 100644
--- a/spring-integration-stream/src/main/java/org/springframework/integration/stream/config/ConsoleInboundChannelAdapterParser.java
+++ b/spring-integration-stream/src/main/java/org/springframework/integration/stream/config/ConsoleInboundChannelAdapterParser.java
@@ -26,7 +26,7 @@ import org.springframework.util.StringUtils;
/**
* Parser for the <stdin-channel-adapter> element.
- *
+ *
* @author Mark Fisher
*/
public class ConsoleInboundChannelAdapterParser extends AbstractPollingInboundChannelAdapterParser {
diff --git a/spring-integration-stream/src/main/java/org/springframework/integration/stream/config/ConsoleOutboundChannelAdapterParser.java b/spring-integration-stream/src/main/java/org/springframework/integration/stream/config/ConsoleOutboundChannelAdapterParser.java
index ae798446c1..9c79e1b5bc 100644
--- a/spring-integration-stream/src/main/java/org/springframework/integration/stream/config/ConsoleOutboundChannelAdapterParser.java
+++ b/spring-integration-stream/src/main/java/org/springframework/integration/stream/config/ConsoleOutboundChannelAdapterParser.java
@@ -26,7 +26,7 @@ import org.springframework.util.StringUtils;
/**
* Parser for the "stdout-" and "stderr-channel-adapter" elements.
- *
+ *
* @author Mark Fisher
*/
public class ConsoleOutboundChannelAdapterParser extends AbstractOutboundChannelAdapterParser {
diff --git a/spring-integration-stream/src/test/java/org/springframework/integration/stream/ByteStreamWritingMessageHandlerTests.java b/spring-integration-stream/src/test/java/org/springframework/integration/stream/ByteStreamWritingMessageHandlerTests.java
index a5220b5154..ecd5fbf948 100644
--- a/spring-integration-stream/src/test/java/org/springframework/integration/stream/ByteStreamWritingMessageHandlerTests.java
+++ b/spring-integration-stream/src/test/java/org/springframework/integration/stream/ByteStreamWritingMessageHandlerTests.java
@@ -53,7 +53,7 @@ public class ByteStreamWritingMessageHandlerTests {
private TestTrigger trigger = new TestTrigger();
- private ThreadPoolTaskScheduler scheduler;
+ private ThreadPoolTaskScheduler scheduler;
@Before
@@ -184,7 +184,7 @@ public class ByteStreamWritingMessageHandlerTests {
trigger.await();
endpoint.stop();
byte[] result2 = stream.toByteArray();
- assertEquals(9, result2.length);
+ assertEquals(9, result2.length);
assertEquals(1, result2[0]);
}
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/support/PayloadValidator.java b/spring-integration-test/src/main/java/org/springframework/integration/test/support/PayloadValidator.java
index f276c55b84..83a4f9933a 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/support/PayloadValidator.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/support/PayloadValidator.java
@@ -16,7 +16,7 @@
package org.springframework.integration.test.support;
/**
- * Validate a message payload. Create an anonymous instance or subclass this
+ * Validate a message payload. Create an anonymous instance or subclass this
* to validate a response payload.
* @author David Turanski
*
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/support/RequestResponseScenario.java b/spring-integration-test/src/main/java/org/springframework/integration/test/support/RequestResponseScenario.java
index 3fb5b1b6ba..7ecbfd6b49 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/support/RequestResponseScenario.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/support/RequestResponseScenario.java
@@ -37,7 +37,8 @@ public class RequestResponseScenario {
protected Message extends Object> getMessage(){
if (message == null){
return new GenericMessage(this.payload);
- } else {
+ }
+else {
return message;
}
}
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/support/SingleRequestResponseScenarioTests.java b/spring-integration-test/src/main/java/org/springframework/integration/test/support/SingleRequestResponseScenarioTests.java
index e9bc005e4e..4c3b8477a0 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/support/SingleRequestResponseScenarioTests.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/support/SingleRequestResponseScenarioTests.java
@@ -21,7 +21,7 @@ import java.util.List;
/**
* Convenience class for a single {@link RequestResponseScenario} test
- *
+ *
* @author David Turanski
*/
public abstract class SingleRequestResponseScenarioTests extends AbstractRequestResponseScenarioTests {
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/support/package-info.java b/spring-integration-test/src/main/java/org/springframework/integration/test/support/package-info.java
index 9438a0b637..8b280c81c8 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/support/package-info.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/support/package-info.java
@@ -1,5 +1,5 @@
/**
- * Provides several test support classes including for testing Spring Integration
+ * Provides several test support classes including for testing Spring Integration
* request-response message scenarios.
*/
package org.springframework.integration.test.support;
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/util/OnlyOnceTrigger.java b/spring-integration-test/src/main/java/org/springframework/integration/test/util/OnlyOnceTrigger.java
index 36469390c5..b21da521e8 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/util/OnlyOnceTrigger.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/util/OnlyOnceTrigger.java
@@ -81,7 +81,8 @@ public class OnlyOnceTrigger implements Trigger {
if (other.executionTime != null) {
return false;
}
- } else if (!executionTime.equals(other.executionTime)) {
+ }
+ else if (!executionTime.equals(other.executionTime)) {
return false;
}
return true;
diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/util/package-info.java b/spring-integration-test/src/main/java/org/springframework/integration/test/util/package-info.java
index 0676d08174..0b0fd5535e 100644
--- a/spring-integration-test/src/main/java/org/springframework/integration/test/util/package-info.java
+++ b/spring-integration-test/src/main/java/org/springframework/integration/test/util/package-info.java
@@ -1,6 +1,6 @@
/**
- * Provides various test utilities, for example
+ * Provides various test utilities, for example
* {@link org.springframework.integration.test.util.TestUtils} provides convenience
- * helpers to easily retrieve private bean properties.
+ * helpers to easily retrieve private bean properties.
*/
package org.springframework.integration.test.util;
diff --git a/spring-integration-test/src/test/java/org/springframework/integration/test/matcher/PayloadMatcherTests.java b/spring-integration-test/src/test/java/org/springframework/integration/test/matcher/PayloadMatcherTests.java
index 72ec712362..276e5a0cef 100644
--- a/spring-integration-test/src/test/java/org/springframework/integration/test/matcher/PayloadMatcherTests.java
+++ b/spring-integration-test/src/test/java/org/springframework/integration/test/matcher/PayloadMatcherTests.java
@@ -69,7 +69,8 @@ public class PayloadMatcherTests {
public void readableException() throws Exception {
try {
assertThat(message, hasPayload("woot"));
- } catch(AssertionError ae){
+ }
+ catch(AssertionError ae){
assertTrue(ae.getMessage().contains("Expected: a Message with payload: "));
}
}
diff --git a/spring-integration-twitter/src/main/java/org/springframework/integration/twitter/core/package-info.java b/spring-integration-twitter/src/main/java/org/springframework/integration/twitter/core/package-info.java
index e2394d6f03..9a2cf590a6 100644
--- a/spring-integration-twitter/src/main/java/org/springframework/integration/twitter/core/package-info.java
+++ b/spring-integration-twitter/src/main/java/org/springframework/integration/twitter/core/package-info.java
@@ -1,4 +1,4 @@
/**
- * Provides classes used across all Twitter components.
+ * Provides classes used across all Twitter components.
*/
package org.springframework.integration.twitter.core;
diff --git a/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/ignored/TestSendingDMsUsingNamespace.java b/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/ignored/TestSendingDMsUsingNamespace.java
index 0f7efbd9a1..225d2f5403 100644
--- a/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/ignored/TestSendingDMsUsingNamespace.java
+++ b/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/ignored/TestSendingDMsUsingNamespace.java
@@ -48,7 +48,7 @@ public class TestSendingDMsUsingNamespace extends AbstractJUnit4SpringContextTes
@Ignore
public void testSendigRealDirectMessage() throws Throwable {
String dmUsr = "z_oleg";
- MessageBuilder mb = MessageBuilder.withPayload("'Hello world!', from the Spring Integration outbound Twitter adapter "
+ MessageBuilder mb = MessageBuilder.withPayload("'Hello world!', from the Spring Integration outbound Twitter adapter "
+ System.currentTimeMillis());
if (StringUtils.hasText(dmUsr)) {
diff --git a/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/outbound/DirectMessageSendingMessageHandlerTests.java b/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/outbound/DirectMessageSendingMessageHandlerTests.java
index 5b1f394e85..898b703350 100644
--- a/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/outbound/DirectMessageSendingMessageHandlerTests.java
+++ b/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/outbound/DirectMessageSendingMessageHandlerTests.java
@@ -40,9 +40,9 @@ public class DirectMessageSendingMessageHandlerTests {
pf.afterPropertiesSet();
Properties prop = pf.getObject();
System.out.println(prop);
- TwitterTemplate template = new TwitterTemplate(prop.getProperty("spring_eip.oauth.consumerKey"),
- prop.getProperty("spring_eip.oauth.consumerSecret"),
- prop.getProperty("spring_eip.oauth.accessToken"),
+ TwitterTemplate template = new TwitterTemplate(prop.getProperty("spring_eip.oauth.consumerKey"),
+ prop.getProperty("spring_eip.oauth.consumerSecret"),
+ prop.getProperty("spring_eip.oauth.accessToken"),
prop.getProperty("spring_eip.oauth.accessTokenSecret"));
Message> message1 = MessageBuilder.withPayload("Polsihing SI Twitter migration")
.setHeader(TwitterHeaders.DM_TARGET_USER_ID, "z_oleg").build();
@@ -50,5 +50,5 @@ public class DirectMessageSendingMessageHandlerTests {
handler.afterPropertiesSet();
handler.handleMessage(message1);
}
-
+
}
diff --git a/spring-integration-ws/src/main/java/org/springframework/integration/ws/WebServiceHeaders.java b/spring-integration-ws/src/main/java/org/springframework/integration/ws/WebServiceHeaders.java
index 94e023ef79..5518b8dca5 100644
--- a/spring-integration-ws/src/main/java/org/springframework/integration/ws/WebServiceHeaders.java
+++ b/spring-integration-ws/src/main/java/org/springframework/integration/ws/WebServiceHeaders.java
@@ -19,7 +19,7 @@ package org.springframework.integration.ws;
/**
* Pre-defined header names to be used when storing or retrieving
* Web Service properties to/from integration Message Headers.
- *
+ *
* @author Mark Fisher
*/
public abstract class WebServiceHeaders {
diff --git a/spring-integration-ws/src/main/java/org/springframework/integration/ws/config/WebServiceInboundGatewayParser.java b/spring-integration-ws/src/main/java/org/springframework/integration/ws/config/WebServiceInboundGatewayParser.java
index e839761264..bd31bbdd31 100644
--- a/spring-integration-ws/src/main/java/org/springframework/integration/ws/config/WebServiceInboundGatewayParser.java
+++ b/spring-integration-ws/src/main/java/org/springframework/integration/ws/config/WebServiceInboundGatewayParser.java
@@ -63,7 +63,7 @@ public class WebServiceInboundGatewayParser extends AbstractInboundGatewayParser
throw new IllegalArgumentException("An 'unmarshaller' is not allowed without 'marshaller'.");
}
}
-
+
if (StringUtils.hasText(marshallerRef) || StringUtils.hasText(unmarshallerRef)){
String extractPayload = element.getAttribute("extract-payload");
if (StringUtils.hasText(extractPayload)) {
diff --git a/spring-integration-ws/src/main/java/org/springframework/integration/ws/package-info.java b/spring-integration-ws/src/main/java/org/springframework/integration/ws/package-info.java
index 8898f95849..3c8070775d 100644
--- a/spring-integration-ws/src/main/java/org/springframework/integration/ws/package-info.java
+++ b/spring-integration-ws/src/main/java/org/springframework/integration/ws/package-info.java
@@ -1,5 +1,5 @@
/**
- * Provides several inbound and outbound Web Service components. Also contains
+ * Provides several inbound and outbound Web Service components. Also contains
* support classes (e.g. Header Mapper)
*/
package org.springframework.integration.ws;
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/MarshallingWebServiceIntegrationTests.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/MarshallingWebServiceIntegrationTests.java
index d3326a438a..4b61be2bd5 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/MarshallingWebServiceIntegrationTests.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/MarshallingWebServiceIntegrationTests.java
@@ -48,7 +48,7 @@ import org.springframework.ws.context.MessageContext;
import org.springframework.xml.transform.StringSource;
/**
- *
+ *
* @author Iwein Fuld
*
*/
@@ -60,7 +60,7 @@ public class MarshallingWebServiceIntegrationTests {
private static final String input = " ";
@Autowired MarshallingWebServiceInboundGateway gateway;
-
+
@Mock
private MessageContext context;
@@ -71,20 +71,20 @@ public class MarshallingWebServiceIntegrationTests {
private WebServiceMessage request;
private Source stringSource = new StreamSource(new StringReader(input));
-
+
private StringWriter output = new StringWriter();
private Result stringResult = new StreamResult(output);
-
+
@Before public void setupMocks(){
MockitoAnnotations.initMocks(this);
}
-
+
@Test
public void configOk() throws Exception {
// just flag invalid config
}
-
+
@Test
public void sendString() throws Exception {
when(context.getResponse()).thenReturn(response);
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubDestinationProvider.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubDestinationProvider.java
index fab0930721..d3a1498a01 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubDestinationProvider.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubDestinationProvider.java
@@ -24,9 +24,9 @@ import org.springframework.ws.client.support.destination.DestinationProvider;
* @author Jonas Partner
*/
public class StubDestinationProvider implements DestinationProvider {
-
+
public URI getDestination() {
- return null;
+ return null;
}
}
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMessageFactory.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMessageFactory.java
index cc010e2b72..96d5b8525d 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMessageFactory.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMessageFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 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.
@@ -51,12 +51,13 @@ public class StubMessageFactory implements WebServiceMessageFactory {
public WebServiceMessage createWebServiceMessage(InputStream inputStream) throws IOException {
try {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
-
+
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
InputSource is = new InputSource( new InputStreamReader(inputStream));
Document document = builder.parse(is);
return new DomPoxMessage(document, transformer, "text/xml");
- } catch (Exception e) {
+ }
+ catch (Exception e) {
throw new IllegalArgumentException(e);
}
}
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMessageSender.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMessageSender.java
index f444cdf7f5..750bdfbf60 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMessageSender.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMessageSender.java
@@ -23,7 +23,7 @@ import org.springframework.ws.transport.WebServiceConnection;
import org.springframework.ws.transport.WebServiceMessageSender;
/**
- *
+ *
* @author Jonas Partner
*
*/
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubUnmarshaller.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubUnmarshaller.java
index dce4d47aca..b6b7859e3b 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubUnmarshaller.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubUnmarshaller.java
@@ -28,7 +28,7 @@ import org.springframework.oxm.XmlMappingException;
*/
public class StubUnmarshaller implements Unmarshaller {
-
+
@SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return false;
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/XmlPayloadConverter.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/XmlPayloadConverter.java
index bda33ebeb7..0e25cdaaf3 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/XmlPayloadConverter.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/XmlPayloadConverter.java
@@ -24,7 +24,7 @@ import org.w3c.dom.Node;
/**
* Converter for creating XML {@link Document}, {@link Node} or {@link Source}
* instances from other types (e.g. String).
- *
+ *
* @author Jonas Partner
*/
public interface XmlPayloadConverter {
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathRouterParser.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathRouterParser.java
index 0b17a95ba9..40d6a9c9ce 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathRouterParser.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathRouterParser.java
@@ -30,7 +30,7 @@ import org.springframework.util.StringUtils;
/**
* Parser for the <xpath-router/> element.
- *
+ *
* @author Jonas Partner
* @author Mark Fisher
* @author Oleg Zhurakousky
@@ -55,7 +55,7 @@ public class XPathRouterParser extends AbstractRouterParser {
BeanDefinition beanDefinition = this.xpathParser.parse((Element) xPathExpressionNodes.item(0), parserContext);
xpathRouterBuilder.addConstructorArgValue(beanDefinition);
}
- else {
+ else {
xpathRouterBuilder.addConstructorArgReference(xPathExpressionRef);
}
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(xpathRouterBuilder, element, "converter");
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathTransformerParser.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathTransformerParser.java
index 540631e905..93150e1646 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathTransformerParser.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathTransformerParser.java
@@ -27,7 +27,7 @@ import org.springframework.util.StringUtils;
/**
* Parser for the 'xpath-transformer' element.
- *
+ *
* @author Mark Fisher
* @since 2.0
*/
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/result/ResultFactory.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/result/ResultFactory.java
index e25122f0b3..3ef42ebd07 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/result/ResultFactory.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/result/ResultFactory.java
@@ -21,7 +21,7 @@ import javax.xml.transform.Result;
/**
* Factory to create a {@link Result} possibly taking into account the
* provided message payload instance.
- *
+ *
* @author Jonas Partner
*/
public interface ResultFactory {
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/result/package-info.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/result/package-info.java
index 1286514135..81ec8d45b5 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/result/package-info.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/result/package-info.java
@@ -1,6 +1,6 @@
/**
- * Provides {@link org.springframework.integration.xml.result.ResultFactory} that
- * will return {@link javax.xml.transform.Result}, possibly taking into account
+ * Provides {@link org.springframework.integration.xml.result.ResultFactory} that
+ * will return {@link javax.xml.transform.Result}, possibly taking into account
* payload instance.
*/
package org.springframework.integration.xml.result;
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/router/package-info.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/router/package-info.java
index ad0b683afc..9fdfd920bd 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/router/package-info.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/router/package-info.java
@@ -1,4 +1,4 @@
/**
- * Provides XML message routers.
+ * Provides XML message routers.
*/
package org.springframework.integration.xml.router;
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/BooleanTestXPathMessageSelector.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/BooleanTestXPathMessageSelector.java
index 0a892f385c..6a097d9b3d 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/BooleanTestXPathMessageSelector.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/BooleanTestXPathMessageSelector.java
@@ -29,7 +29,7 @@ import org.springframework.xml.xpath.XPathExpression;
* Boolean XPath testing {@link MessageSelector}. Requires an XPathExpression
* which can be evaluated using {@link XPathExpression#evaluateAsBoolean(Node)}.
* Supports payloads of type {@link Document} or {@link String}.
- *
+ *
* @author Jonas Partner
*/
public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelector {
@@ -37,7 +37,7 @@ public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelecto
/**
* Create a boolean testing XPath {@link MessageSelector} supporting
* multiple namespaces.
- *
+ *
* @param expression XPath expression as a String
* @param namespaces Map of namespaces where the keys are namespace prefixes
*/
@@ -47,7 +47,7 @@ public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelecto
/**
* Create a boolean testing XPath {@link MessageSelector} supporting a single namespace.
- *
+ *
* @param expression XPath expression as a String
* @param prefix namespace prefix
* @param namespace namespace URI
@@ -58,7 +58,7 @@ public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelecto
/**
* Create a boolean testing XPath {@link MessageSelector} with no namespace support.
- *
+ *
* @param expression XPath expression as a String
*/
public BooleanTestXPathMessageSelector(String expression) {
@@ -68,7 +68,7 @@ public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelecto
/**
* Create a boolean testing XPath {@link MessageSelector} using the
* provided {@link XPathExpression}.
- *
+ *
* @param expression XPath expression
*/
public BooleanTestXPathMessageSelector(XPathExpression expression) {
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/RegexTestXPathMessageSelector.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/RegexTestXPathMessageSelector.java
index 0b47a2f410..d2458ba75b 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/RegexTestXPathMessageSelector.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/RegexTestXPathMessageSelector.java
@@ -29,7 +29,7 @@ import org.springframework.xml.xpath.XPathExpression;
/**
* XPath {@link MessageSelector} that tests if a provided String value
* matches a given Regular Expression.
- *
+ *
* @author Mark Fisher
* @since 2.1
*/
@@ -40,7 +40,7 @@ public class RegexTestXPathMessageSelector extends AbstractXPathMessageSelector
/**
* Creates a selector which attempts to match the given regex and supports multiple namespaces.
- *
+ *
* @param expression XPath expression as a String
* @param namespaces Map of namespaces where the keys are namespace prefixes
* @param regex regular expression to match
@@ -53,7 +53,7 @@ public class RegexTestXPathMessageSelector extends AbstractXPathMessageSelector
/**
* Creates a selector which attempts to match the given regex and supports a single namespace.
- *
+ *
* @param expression XPath expression as a String
* @param prefix namespace prefix
* @param namespace namespace URI
@@ -66,8 +66,8 @@ public class RegexTestXPathMessageSelector extends AbstractXPathMessageSelector
}
/**
- * Creates a non-namespaced selector which attempts to match the given regex.
- *
+ * Creates a non-namespaced selector which attempts to match the given regex.
+ *
* @param expression XPath expression as a String
* @param regex regular expression to match
*/
@@ -80,7 +80,7 @@ public class RegexTestXPathMessageSelector extends AbstractXPathMessageSelector
/**
* Creates a selector which attempts to match the given regex against the evaluation result
* of the provided {@link XPathExpression}.
- *
+ *
* @param expression XPath expression
* @param regex regular expression to match
*/
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/package-info.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/package-info.java
index bbd79e1507..872a033f35 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/package-info.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/package-info.java
@@ -1,5 +1,5 @@
/**
- * Provides XML-centric {@link org.springframework.integration.core.MessageSelector}
- * implementations.
+ * Provides XML-centric {@link org.springframework.integration.core.MessageSelector}
+ * implementations.
*/
package org.springframework.integration.xml.selector;
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/DomSourceFactory.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/DomSourceFactory.java
index e642f4bbce..dc9ecc8ab6 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/DomSourceFactory.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/DomSourceFactory.java
@@ -33,7 +33,7 @@ import org.springframework.messaging.MessagingException;
/**
* {@link SourceFactory} implementation which supports creation of a {@link DOMSource}
* from a {@link Document}, {@link File} or {@link String} payload.
- *
+ *
* @author Jonas Partner
* @author Mark Fisher
*/
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/StringSourceFactory.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/StringSourceFactory.java
index d9da489802..2b2afd7b26 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/StringSourceFactory.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/StringSourceFactory.java
@@ -34,7 +34,7 @@ import org.springframework.xml.transform.StringSource;
/**
* {@link SourceFactory} implementation which supports creation of a {@link StringSource}
* from a {@link Document}, {@link File} or {@link String} payload
- *
+ *
* @author Jonas Partner
* @author Mark Fisher
*/
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/package-info.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/package-info.java
index a0af5247e0..188d09c655 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/package-info.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/source/package-info.java
@@ -1,5 +1,5 @@
/**
- * Provides various {@link org.springframework.integration.xml.source.SourceFactory}
- * implementations.
+ * Provides various {@link org.springframework.integration.xml.source.SourceFactory}
+ * implementations.
*/
package org.springframework.integration.xml.source;
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/splitter/package-info.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/splitter/package-info.java
index 4362c58541..111afc2523 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/splitter/package-info.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/splitter/package-info.java
@@ -1,5 +1,5 @@
/**
- * Provides implementations of
+ * Provides implementations of
* {@link org.springframework.integration.splitter.AbstractMessageSplitter}.
*/
package org.springframework.integration.xml.splitter;
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/ResultToDocumentTransformer.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/ResultToDocumentTransformer.java
index de44d6c579..038b9cf983 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/ResultToDocumentTransformer.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/ResultToDocumentTransformer.java
@@ -33,7 +33,7 @@ import org.springframework.xml.transform.StringResult;
/**
* Creates a {@link Document} from a {@link Result} payload. Supports
* {@link DOMResult} and {@link StringResult} implementations.
- *
+ *
* @author Jonas Partner
*/
public class ResultToDocumentTransformer implements ResultTransformer {
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/ResultToStringTransformer.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/ResultToStringTransformer.java
index 871ad29a27..f22d1c9f14 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/ResultToStringTransformer.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/ResultToStringTransformer.java
@@ -32,7 +32,7 @@ import org.springframework.xml.transform.StringResult;
/**
* Converts the passed {@link Result} to an instance of {@link String}.
* Supports {@link StringResult} and {@link DOMResult}
- *
+ *
* @author Jonas Partner
* @author Mark Fisher
*/
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/SourceCreatingTransformer.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/SourceCreatingTransformer.java
index 539cad4293..247a1bca9c 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/SourceCreatingTransformer.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/SourceCreatingTransformer.java
@@ -25,7 +25,7 @@ import org.springframework.integration.xml.source.SourceFactory;
/**
* Transforms the payload to a {@link Source} using a {@link SourceFactory}.
* Defaults to using a {@link DomSourceFactory} if an alternative is not provided.
- *
+ *
* @author Jonas Partner
*/
public class SourceCreatingTransformer extends AbstractPayloadTransformer {
diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/xpath/package-info.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/xpath/package-info.java
index ec6943f6e0..7fa8dfa92a 100644
--- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/xpath/package-info.java
+++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/xpath/package-info.java
@@ -1,4 +1,4 @@
/**
- * Provides XPath supporting classes.
+ * Provides XPath supporting classes.
*/
package org.springframework.integration.xml.xpath;
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubMarshaller.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubMarshaller.java
index 8817e50492..0a6843399a 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubMarshaller.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubMarshaller.java
@@ -27,7 +27,7 @@ import org.springframework.oxm.XmlMappingException;
import org.springframework.xml.transform.StringSource;
/**
- *
+ *
* @author Jonas Partner
*
*/
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubResultTransformer.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubResultTransformer.java
index 33fbf98b05..cb6be95397 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubResultTransformer.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubResultTransformer.java
@@ -23,11 +23,11 @@ import org.springframework.integration.xml.transformer.ResultTransformer;
public class StubResultTransformer implements ResultTransformer {
Object toReturn;
-
+
public StubResultTransformer(Object toReturn){
this.toReturn = toReturn;
}
-
+
public Object transformResult(Result res) {
return toReturn;
}
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubUnmarshaller.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubUnmarshaller.java
index 9151950f5b..758c7bd08a 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubUnmarshaller.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubUnmarshaller.java
@@ -25,7 +25,7 @@ import org.springframework.oxm.Unmarshaller;
import org.springframework.oxm.XmlMappingException;
/**
- *
+ *
* @author Jonas Partner
*
*/
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/TestXmlApplicationContext.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/TestXmlApplicationContext.java
index 1118d8de40..223b5cf9e3 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/TestXmlApplicationContext.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/TestXmlApplicationContext.java
@@ -27,7 +27,7 @@ import org.springframework.core.io.Resource;
public class TestXmlApplicationContext extends AbstractXmlApplicationContext {
private final Resource[] resources;
-
+
public TestXmlApplicationContext(String ... xmlStrings){
resources = new Resource[xmlStrings.length];
for (int i = 0 ; i < xmlStrings.length; i++) {
@@ -35,7 +35,7 @@ public class TestXmlApplicationContext extends AbstractXmlApplicationContext {
}
refresh();
}
-
+
@Override
protected Resource[] getConfigResources() {
return resources;
@@ -44,20 +44,20 @@ public class TestXmlApplicationContext extends AbstractXmlApplicationContext {
private static class TestResource extends AbstractResource{
String xmlString;
-
+
TestResource(String xmlString){
this.xmlString = xmlString;
}
-
+
public String getDescription() {
return "test";
}
public InputStream getInputStream() throws IOException {
- return new ByteArrayInputStream(xmlString.getBytes("UTF-8"));
+ return new ByteArrayInputStream(xmlString.getBytes("UTF-8"));
}
-
- }
-
+
+ }
+
}
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XPathExpressionParserTests.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XPathExpressionParserTests.java
index 1b2dd421c3..5d143ad85c 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XPathExpressionParserTests.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XPathExpressionParserTests.java
@@ -75,7 +75,8 @@ public class XPathExpressionParserTests {
try {
getXPathExpression(xmlDoc.toString());
- } catch (BeanDefinitionStoreException e) {
+ }
+ catch (BeanDefinitionStoreException e) {
assertTrue(e.getCause() instanceof SAXParseException);
return;
}
@@ -100,7 +101,8 @@ public class XPathExpressionParserTests {
try {
getXPathExpression(xmlDoc.toString());
- } catch (BeanDefinitionStoreException e) {
+ }
+ catch (BeanDefinitionStoreException e) {
assertEquals("It is not valid to specify both, the namespace attributes ('ns-prefix' and 'ns-uri') and the 'namespace-map' attribute.", e.getCause().getMessage());
return;
}
@@ -117,7 +119,8 @@ public class XPathExpressionParserTests {
.append("");
try {
getXPathExpression(xmlDoc.toString());
- } catch (BeanDefinitionStoreException e) {
+ }
+ catch (BeanDefinitionStoreException e) {
assertEquals("It is not valid to specify both, the namespace attributes ('ns-prefix' and 'ns-uri') and the 'map' sub-element.", e.getCause().getMessage());
return;
}
@@ -135,7 +138,8 @@ public class XPathExpressionParserTests {
.append(" ");
try {
getXPathExpression(xmlDoc.toString());
- } catch (BeanDefinitionStoreException e) {
+ }
+ catch (BeanDefinitionStoreException e) {
assertEquals("It is not valid to specify both, the 'namespace-map' attribute and the 'map' sub-element.", e.getCause().getMessage());
return;
}
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/router/XPathRouterTests.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/router/XPathRouterTests.java
index a183556c91..64f933e763 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/router/XPathRouterTests.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/router/XPathRouterTests.java
@@ -30,7 +30,7 @@ import org.springframework.integration.xml.util.XmlTestUtil;
import org.springframework.xml.xpath.XPathExpression;
import org.springframework.xml.xpath.XPathExpressionFactory;
-/**
+/**
* @author Jonas Partner
*/
public class XPathRouterTests {
@@ -45,7 +45,7 @@ public class XPathRouterTests {
assertEquals("Wrong number of channels returned", 1, channelNames.length);
assertEquals("Wrong channel name", "one", channelNames[0]);
}
-
+
@Test
@SuppressWarnings({ "unchecked", "rawtypes" })
public void simpleSingleAttributeAsString() throws Exception {
@@ -57,10 +57,10 @@ public class XPathRouterTests {
assertEquals("Wrong number of channels returned", 1, channelNames.length);
assertEquals("Wrong channel name", "one", channelNames[0]);
}
-
+
@Test
@SuppressWarnings({ "unchecked", "rawtypes" })
- public void simpleRootNode() throws Exception {
+ public void simpleRootNode() throws Exception {
Document doc = XmlTestUtil.getDocumentForString("oleg bang ");
XPathExpression expression = XPathExpressionFactory.createXPathExpression("name(./node())");
XPathRouter router = new XPathRouter(expression);
@@ -81,15 +81,15 @@ public class XPathRouterTests {
assertEquals("Wrong channel name", "bOne", channelNames[0]);
assertEquals("Wrong channel name", "bTwo", channelNames[1]);
}
-
+
@Test
@SuppressWarnings({ "unchecked", "rawtypes" })
/*
- * Will return only one (the first node text in the collection), since
+ * Will return only one (the first node text in the collection), since
* the evaluation return type use is String (not NODESET)
* This test is just for sanity and the reminder that setting 'evaluateAsNode'
- * to 'false' would still result in no exception but result will most likely be
+ * to 'false' would still result in no exception but result will most likely be
* not what is expected.
*/
public void multipleNodeValuesAsString() throws Exception {
@@ -116,7 +116,7 @@ public class XPathRouterTests {
assertEquals("bob",channelNames[0]);
assertEquals("dave",channelNames[1]);
}
-
+
@Test
public void testSimpleDocType() throws Exception {
Document doc = XmlTestUtil.getDocumentForString(" ");
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbAnnotatedPerson.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbAnnotatedPerson.java
index adc4c9a421..7f6a79085d 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbAnnotatedPerson.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbAnnotatedPerson.java
@@ -22,7 +22,7 @@ import javax.xml.bind.annotation.XmlType;
@XmlType @XmlRootElement(name="person")
public class JaxbAnnotatedPerson {
-
+
@XmlElement(name="firstname")
public String getFirstName() {
return firstName;
@@ -32,9 +32,9 @@ public class JaxbAnnotatedPerson {
this.firstName = firstName;
}
-
+
private String firstName;
-
-
+
+
}
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbMarshallingIntegrationTests.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbMarshallingIntegrationTests.java
index a70e9ed5f8..735be2490c 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbMarshallingIntegrationTests.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbMarshallingIntegrationTests.java
@@ -41,20 +41,20 @@ import org.springframework.xml.transform.StringSource;
*/
@ContextConfiguration
public class JaxbMarshallingIntegrationTests extends AbstractJUnit4SpringContextTests {
-
+
@Autowired @Qualifier("marshallIn")
MessageChannel marshallIn;
-
+
@Autowired @Qualifier("marshallOut")
PollableChannel marshalledOut;
-
+
@Autowired @Qualifier("unmarshallIn")
MessageChannel unmarshallIn;
-
+
@Autowired @Qualifier("unmarshallOut")
PollableChannel unmarshallOut;
-
-
+
+
@SuppressWarnings("unchecked")
@Test
public void testMarshalling() throws Exception{
@@ -68,7 +68,7 @@ public class JaxbMarshallingIntegrationTests extends AbstractJUnit4SpringContext
assertEquals("Wrong name for root element ", "person",doc.getDocumentElement().getLocalName());
}
-
+
@SuppressWarnings("unchecked")
@Test
public void testUnmarshalling() throws Exception{
@@ -79,8 +79,8 @@ public class JaxbMarshallingIntegrationTests extends AbstractJUnit4SpringContext
assertTrue("Not a Person ", res.getPayload() instanceof JaxbAnnotatedPerson);
JaxbAnnotatedPerson person = (JaxbAnnotatedPerson)res.getPayload();
assertEquals("Worng firstname", "bob", person.getFirstName());
-
+
}
-
-
+
+
}
diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppMessageConsumer.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppMessageConsumer.java
index 3aab8fe3a1..bbd49eb5ec 100644
--- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppMessageConsumer.java
+++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppMessageConsumer.java
@@ -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.
@@ -35,9 +35,11 @@ public class XmppMessageConsumer {
String text = null;
if (input instanceof Message) {
text = ((Message) input).getBody();
- } else if (input instanceof String) {
+ }
+ else if (input instanceof String) {
text = (String) input;
- } else {
+ }
+ else {
throw new IllegalArgumentException(
"expected either a Smack Message or a String, but received: " + input);
}
diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml
index 63f0c65805..402a6afd5c 100644
--- a/src/checkstyle/checkstyle.xml
+++ b/src/checkstyle/checkstyle.xml
@@ -31,27 +31,27 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
@@ -148,11 +148,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/src/checkstyle/fixRightCurly.gradle b/src/checkstyle/fixRightCurly.gradle
new file mode 100644
index 0000000000..36d583d329
--- /dev/null
+++ b/src/checkstyle/fixRightCurly.gradle
@@ -0,0 +1,63 @@
+task fixRightCurly << {
+ fileTree("${buildDir}/reports/checkstyle").include('*.xml').each { report ->
+ def xml = new XmlParser(false, false).parse(report)
+ xml.file.each { f ->
+ def errors = f.error
+ def thisErrors = []
+ errors.each { error ->
+ if (error.@source == 'com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck') {
+ thisErrors.add(error)
+ }
+ }
+ if (thisErrors) {
+ def errorInx = 0
+ def error = thisErrors[errorInx++]
+ def file = new File(f.@name)
+ println "Fixing file $file ..."
+ boolean headerFixed
+ def outSource = ''
+ file.eachLine { line, ln ->
+ if (!headerFixed) {
+ def matcher = line =~ /Copyright (20\d\d)(?:-(20\d\d))?/
+ if (matcher.count) {
+ def year1 = matcher[0][1]
+ if (now != year1) {
+ if (now != matcher[0][2]) {
+ line = line.replaceFirst(/(20\d\d)(?:-20\d\d)?/, year1 + "-$now")
+ }
+ }
+ headerFixed = true
+ }
+ }
+
+ if (error && ln == (error.@line as int)) {
+ def index = (error.@column as int) + 1
+ def chars = line.toCharArray()
+ def nextLine = System.lineSeparator()
+ for (int i = 0; i < index; i++) {
+ if (chars[i] == '\t') { // tabs before code == 8
+ index -= 7;
+ nextLine += '\t'
+ }
+ else if (chars[i] != ' ') { // tabs after code start are only counted as 1
+ break;
+ }
+ }
+
+ line = line.substring(0, index-1) + nextLine + line.substring(index)
+
+ println "Fixed line $line"
+
+ while (error && ln == (error.@line as int)) {
+ error = thisErrors[errorInx++]
+ }
+ }
+
+ outSource += line + System.lineSeparator()
+ }
+ file.write(outSource)
+ println()
+ }
+ }
+ }
+}