Add Nullability support into Java DSL

This commit is contained in:
abilan
2023-04-14 14:16:36 -04:00
parent 053cc00484
commit d5181bf0d7
105 changed files with 514 additions and 366 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2022 the original author or authors.
* Copyright 2016-2023 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.
@@ -23,6 +23,7 @@ import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
@@ -176,7 +177,7 @@ public class FlowServiceTests {
private final AtomicReference<Object> resultOverLoggingHandler = new AtomicReference<>();
@Override
public void configure(IntegrationFlowDefinition<?> f) {
public void configure(@NotNull IntegrationFlowDefinition<?> f) {
f.<String, String>transform(String::toUpperCase)
.log(LoggingHandler.Level.ERROR, m -> {
resultOverLoggingHandler.set(m.getPayload());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2020 the original author or authors.
* Copyright 2018-2023 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.
@@ -114,8 +114,8 @@ class RouterDslTests {
integrationFlow {
split()
route<Int, Boolean>({ it % 2 == 0 }) {
subFlowMapping(true) { gateway(oddFlow().inputChannel) }
subFlowMapping(false) { gateway(evenFlow().inputChannel) }
subFlowMapping(true) { gateway(oddFlow()) }
subFlowMapping(false) { gateway(evenFlow()) }
}
aggregate()
}