Lambdas for Remaining Modules JPA -> ZK
Polishing - PR Comments and Closeable Warnings Eclipse emits bogus warnings with exceptions in lambdas. Even though the lambda might run on another thread, elipse thinks it could cause the context to not be closed. SPR-14854: MessageChannel is now a @FunctionalInterface * Additional Lambda polishing and some code style fixes
This commit is contained in:
committed by
Artem Bilan
parent
16be9fc47d
commit
67d6cd0c89
@@ -51,7 +51,7 @@ public class ByteStreamWritingMessageHandlerTests {
|
||||
|
||||
private PollingConsumer endpoint;
|
||||
|
||||
private TestTrigger trigger = new TestTrigger();
|
||||
private final TestTrigger trigger = new TestTrigger();
|
||||
|
||||
private ThreadPoolTaskScheduler scheduler;
|
||||
|
||||
@@ -244,6 +244,11 @@ public class ByteStreamWritingMessageHandlerTests {
|
||||
|
||||
private volatile CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
TestTrigger() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date nextExecutionTime(TriggerContext triggerContext) {
|
||||
if (!hasRun.getAndSet(true)) {
|
||||
return new Date();
|
||||
|
||||
@@ -50,7 +50,7 @@ public class CharacterStreamWritingMessageHandlerTests {
|
||||
|
||||
private PollingConsumer endpoint;
|
||||
|
||||
private TestTrigger trigger = new TestTrigger();
|
||||
private final TestTrigger trigger = new TestTrigger();
|
||||
|
||||
private ThreadPoolTaskScheduler scheduler;
|
||||
|
||||
@@ -192,12 +192,13 @@ public class CharacterStreamWritingMessageHandlerTests {
|
||||
|
||||
private static class TestObject {
|
||||
|
||||
private String text;
|
||||
private final String text;
|
||||
|
||||
TestObject(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.text;
|
||||
}
|
||||
@@ -211,6 +212,11 @@ public class CharacterStreamWritingMessageHandlerTests {
|
||||
|
||||
private volatile CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
TestTrigger() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date nextExecutionTime(TriggerContext triggerContext) {
|
||||
if (!hasRun.getAndSet(true)) {
|
||||
return new Date();
|
||||
|
||||
Reference in New Issue
Block a user