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`**
This commit is contained in:
Falk Hanisch
2023-10-10 19:46:57 +02:00
committed by GitHub
parent 75fcddac00
commit 49cd14cb8a
2 changed files with 2 additions and 0 deletions

View File

@@ -70,6 +70,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);
}