Polish build

This commit is contained in:
Janne Valkealahti
2019-12-25 09:23:49 +00:00
parent 00a4fae3a1
commit 2eebb2b0bf
6 changed files with 18 additions and 5 deletions

View File

@@ -77,7 +77,7 @@ configure(allprojects) {
group = 'org.springframework.statemachine'
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:deprecation']
repositories {
mavenCentral()
@@ -626,7 +626,6 @@ configure(rootProject) {
include 'index.adoc'
}
options doctype: 'book', eruby: 'erubis'
logDocuments = true
attributes 'icons': 'font',
'sectanchors': '',
'toc': '',
@@ -647,7 +646,6 @@ configure(rootProject) {
}
}
options doctype: 'book', eruby: 'erubis'
logDocuments = true
attributes 'docinfo': 'shared',
toc: 'left',
'toc-levels': '4',

View File

@@ -103,7 +103,7 @@ public class DistributedStateMachine<S, E> extends LifecycleObjectSupport implem
}
@Override
@SuppressWarnings("deprecation")
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(Message<E> event) {
// adding state machine id to the message so that
// listeners can know from where a state change originates
@@ -111,6 +111,7 @@ public class DistributedStateMachine<S, E> extends LifecycleObjectSupport implem
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(E event) {
return sendEvent(MessageBuilder.withPayload(event).build());
}
@@ -319,7 +320,7 @@ public class DistributedStateMachine<S, E> extends LifecycleObjectSupport implem
public void stateChanged(StateMachineContext<S, E> context) {
// do not pass if state change was originated from this dist machine
if (!ObjectUtils.nullSafeEquals(delegate.getUuid(),
context.getEventHeaders().get(StateMachineSystemConstants.STATEMACHINE_IDENTIFIER))) {
context.getEventHeaders().get(StateMachineSystemConstants.STATEMACHINE_IDENTIFIER))) {
Message<E> m = MessageBuilder.withPayload(context.getEvent())
.copyHeaders(context.getEventHeaders())
.build();

View File

@@ -218,6 +218,7 @@ public abstract class AbstractStateMachine<S, E> extends StateMachineObjectSuppo
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(Message<E> event) {
return sendEvent(Mono.just(event))
.switchIfEmpty(Flux.just(StateMachineEventResult.<S, E>from(this, event, ResultType.DENIED)))
@@ -233,6 +234,7 @@ public abstract class AbstractStateMachine<S, E> extends StateMachineObjectSuppo
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(E event) {
return sendEvent(MessageBuilder.withPayload(event).build());
}

View File

@@ -122,19 +122,23 @@ public class StateMachineAccessTests {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public void start() {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public void stop() {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(Message<String> event) {
return false;
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(String event) {
return false;
}

View File

@@ -177,20 +177,24 @@ public class StateContextExpressionMethodsTests {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public void start() {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public void stop() {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(Message<SpelEvents> event) {
events.add(event);
return true;
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(SpelEvents event) {
return sendEvent(MessageBuilder.createMessage(event, new MessageHeaders(new HashMap<String, Object>())));
}

View File

@@ -717,19 +717,23 @@ public class ZookeeperStateMachineEnsembleTests extends AbstractZookeeperTests {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public void start() {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public void stop() {
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(Message<String> event) {
return false;
}
@Override
@SuppressWarnings({"all", "deprecation"})
public boolean sendEvent(String event) {
return false;
}