1818
1919import java .util .UUID ;
2020
21+ import org .jspecify .annotations .Nullable ;
22+
2123import org .springframework .aop .framework .AopProxyUtils ;
2224import org .springframework .beans .BeansException ;
2325import org .springframework .beans .factory .BeanFactory ;
3739import org .springframework .integration .support .channel .ChannelResolverUtils ;
3840import org .springframework .integration .support .context .NamedComponent ;
3941import org .springframework .integration .support .utils .IntegrationUtils ;
40- import org .springframework .lang .Nullable ;
4142import org .springframework .messaging .MessageChannel ;
4243import org .springframework .messaging .core .DestinationResolver ;
4344import org .springframework .scheduling .TaskScheduler ;
@@ -71,38 +72,50 @@ public abstract class IntegrationObjectSupport implements ComponentSourceAware,
7172
7273 protected final LogAccessor logger = new LogAccessor (getClass ()); // NOSONAR protected
7374
75+ @ SuppressWarnings ("NullAway.Init" )
7476 private DestinationResolver <MessageChannel > channelResolver ;
7577
78+ @ SuppressWarnings ("NullAway.Init" )
7679 private String beanName ;
7780
81+ @ Nullable
7882 private String componentName ;
7983
84+ @ SuppressWarnings ("NullAway.Init" )
8085 private BeanFactory beanFactory ;
8186
87+ @ Nullable
8288 private TaskScheduler taskScheduler ;
8389
8490 private IntegrationProperties integrationProperties = new IntegrationProperties ();
8591
92+ @ Nullable
8693 private ConversionService conversionService ;
8794
95+ @ SuppressWarnings ("NullAway.Init" )
8896 private ApplicationContext applicationContext ;
8997
98+ @ SuppressWarnings ("NullAway.Init" )
9099 private MessageBuilderFactory messageBuilderFactory ;
91100
101+ @ Nullable
92102 private Expression expression ;
93103
104+ @ Nullable
94105 private Object beanSource ;
95106
107+ @ Nullable
96108 private String beanDescription ;
97109
98110 private boolean initialized ;
99111
100112 @ Override
101- public final void setBeanName (@ Nullable String beanName ) {
113+ public final void setBeanName (String beanName ) {
102114 this .beanName = beanName ;
103115 }
104116
105117 @ Override
118+ @ Nullable
106119 public String getBeanName () {
107120 return this .beanName ;
108121 }
@@ -112,6 +125,7 @@ public String getBeanName() {
112125 * If {@link #componentName} was not set this method will default to the 'beanName' of this component;
113126 */
114127 @ Override
128+ @ Nullable
115129 public String getComponentName () {
116130 return StringUtils .hasText (this .componentName ) ? this .componentName : this .beanName ;
117131 }
@@ -127,6 +141,7 @@ public void setComponentName(String componentName) {
127141 /**
128142 * Subclasses may implement this method to provide component type information.
129143 */
144+ @ Nullable
130145 @ Override
131146 public String getComponentType () {
132147 return null ;
@@ -194,6 +209,7 @@ public void setChannelResolver(DestinationResolver<MessageChannel> channelResolv
194209 }
195210
196211 @ Override
212+ @ Nullable
197213 public Expression getExpression () {
198214 return this .expression ;
199215 }
@@ -207,6 +223,7 @@ public final void setPrimaryExpression(Expression expression) {
207223 this .expression = expression ;
208224 }
209225
226+ @ SuppressWarnings ("NullAway.Init" )
210227 @ Override
211228 public final void afterPropertiesSet () {
212229 this .integrationProperties = IntegrationContextUtils .getIntegrationProperties (this .beanFactory );
@@ -263,6 +280,7 @@ public void setTaskScheduler(TaskScheduler taskScheduler) {
263280 this .taskScheduler = taskScheduler ;
264281 }
265282
283+ @ Nullable
266284 protected TaskScheduler getTaskScheduler () {
267285 if (this .taskScheduler == null && this .beanFactory != null ) {
268286 this .taskScheduler = IntegrationContextUtils .getTaskScheduler (this .beanFactory );
@@ -277,6 +295,7 @@ protected DestinationResolver<MessageChannel> getChannelResolver() {
277295 return this .channelResolver ;
278296 }
279297
298+ @ Nullable
280299 public ConversionService getConversionService () {
281300 if (this .conversionService == null && this .beanFactory != null ) {
282301 this .conversionService = IntegrationUtils .getConversionService (this .beanFactory );
@@ -298,6 +317,7 @@ public void setConversionService(ConversionService conversionService) {
298317 * {@link ApplicationContext} is available.
299318 * @return The id, or null if there is no application context.
300319 */
320+ @ Nullable
301321 public String getApplicationContextId () {
302322 return this .applicationContext == null ? null : this .applicationContext .getId ();
303323 }
0 commit comments