1919import java .util .Locale ;
2020import java .util .Map ;
2121
22+ import org .jspecify .annotations .Nullable ;
23+
2224import org .springframework .beans .factory .BeanFactory ;
2325import org .springframework .expression .Expression ;
2426import org .springframework .expression .common .LiteralExpression ;
3032import org .springframework .integration .expression .FunctionExpression ;
3133import org .springframework .integration .expression .SupplierExpression ;
3234import org .springframework .integration .handler .AbstractReplyProducingMessageHandler ;
33- import org .springframework .lang .Nullable ;
3435import org .springframework .messaging .Message ;
3536import org .springframework .util .Assert ;
3637
@@ -49,16 +50,15 @@ public class GraphQlMessageHandler extends AbstractReplyProducingMessageHandler
4950
5051 private StandardEvaluationContext evaluationContext = new StandardEvaluationContext ();
5152
52- @ Nullable
53- private Expression operationExpression ;
53+ private @ Nullable Expression operationExpression ;
5454
5555 private Expression operationNameExpression = new SupplierExpression <>(() -> null );
5656
5757 private Expression variablesExpression = new SupplierExpression <>(() -> null );
5858
59- @ Nullable
60- private Locale locale ;
59+ private @ Nullable Locale locale ;
6160
61+ @ SuppressWarnings ("NullAway" ) // In most cases the message really comes with an ID
6262 private Expression executionIdExpression =
6363 new FunctionExpression <Message <?>>(message -> message .getHeaders ().getId ());
6464
@@ -163,19 +163,16 @@ private String evaluateOperationExpression(Message<?> message) {
163163 return operation ;
164164 }
165165
166- @ Nullable
167- private String evaluateOperationNameExpression (Message <?> message ) {
166+ private @ Nullable String evaluateOperationNameExpression (Message <?> message ) {
168167 return this .operationNameExpression .getValue (this .evaluationContext , message , String .class );
169168 }
170169
171- @ Nullable
172170 @ SuppressWarnings ("unchecked" )
173- private Map <String , Object > evaluateVariablesExpression (Message <?> message ) {
171+ private @ Nullable Map <String , Object > evaluateVariablesExpression (Message <?> message ) {
174172 return this .variablesExpression .getValue (this .evaluationContext , message , Map .class );
175173 }
176174
177- @ Nullable
178- private String evaluateExecutionIdExpression (Message <?> message ) {
175+ private @ Nullable String evaluateExecutionIdExpression (Message <?> message ) {
179176 return this .executionIdExpression .getValue (this .evaluationContext , message , String .class );
180177 }
181178
0 commit comments