GH-8750: Add @Nullable to getRegistrationById()

Fixes https://github.com/spring-projects/spring-integration/issues/8750

* annotate `IntegrationFlowRegistration.getRegistrationById(String flowId)` with `@org.springframework.lang.Nullable`
* annotate `StandardIntegrationFlowContext.getRegistrationById(String flowId)` with `@org.springframework.lang.Nullable`

**Cherry-pick to `6.1.x` & `6.0.x`**

(cherry picked from commit 49cd14cb8a)
This commit is contained in:
Falk Hanisch
2023-10-10 19:46:57 +02:00
committed by Artem Bilan
parent f64cda7e20
commit 680acfbb97
2 changed files with 2 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ public interface IntegrationFlowContext {
* @param flowId the bean name to obtain
* @return the IntegrationFlowRegistration for provided {@code id} or {@code null}
*/
@Nullable
IntegrationFlowRegistration getRegistrationById(String flowId);
/**

View File

@@ -178,6 +178,7 @@ public final class StandardIntegrationFlowContext implements IntegrationFlowCont
* @return the IntegrationFlowRegistration for provided {@code id} or {@code null}
*/
@Override
@Nullable
public IntegrationFlowRegistration getRegistrationById(String flowId) {
return this.registry.get(flowId);
}