diff --git a/spring-expression/src/main/java/org/springframework/expression/ExpressionException.java b/spring-expression/src/main/java/org/springframework/expression/ExpressionException.java index a79b9fad561..7ee2ae06d4f 100644 --- a/spring-expression/src/main/java/org/springframework/expression/ExpressionException.java +++ b/spring-expression/src/main/java/org/springframework/expression/ExpressionException.java @@ -153,7 +153,7 @@ public class ExpressionException extends RuntimeException { * that caused the failure. * @since 4.0 */ - @SuppressWarnings("NullAway") + @SuppressWarnings("NullAway") // Dataflow analysis limitation public String getSimpleMessage() { return super.getMessage(); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java index 5734b40fb86..a054be747a6 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java @@ -174,7 +174,6 @@ public class FunctionReference extends SpelNodeImpl { * @throws EvaluationException if there is any problem invoking the method * @since 6.1 */ - @SuppressWarnings("NullAway") // TODO Remove when NullAway 0.12.2 is released, see https://github.com/uber/NullAway/pull/1089 private TypedValue executeFunctionViaMethodHandle(ExpressionState state, MethodHandle methodHandle) throws EvaluationException { Object[] functionArgs = getArguments(state); MethodType declaredParams = methodHandle.type(); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Operator.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Operator.java index 91c23cb595e..a81e40609c0 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Operator.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Operator.java @@ -351,7 +351,7 @@ public abstract class Operator extends SpelNodeImpl { * @param rightActualDescriptor the dynamic/runtime right object descriptor * @return a DescriptorComparison object indicating the type of compatibility, if any */ - @SuppressWarnings("NullAway") + @SuppressWarnings("NullAway") // Dataflow analysis limitation public static DescriptorComparison checkNumericCompatibility( @Nullable String leftDeclaredDescriptor, @Nullable String rightDeclaredDescriptor, @Nullable String leftActualDescriptor, @Nullable String rightActualDescriptor) { diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java b/spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java index 05111daa74d..aa10ab87924 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java @@ -166,7 +166,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser { // | (DEFAULT^ logicalOrExpression) // | (QMARK^ expression COLON! expression) // | (ELVIS^ expression))?; - @SuppressWarnings("NullAway") + @SuppressWarnings("NullAway") // Not null assertion performed in SpelNodeImpl constructor private @Nullable SpelNodeImpl eatExpression() { SpelNodeImpl expr = eatLogicalOrExpression(); Token t = peekToken(); @@ -273,7 +273,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser { } //sumExpression: productExpression ( (PLUS^ | MINUS^) productExpression)*; - @SuppressWarnings("NullAway") + @SuppressWarnings("NullAway") // Not null assertion performed in SpelNodeImpl constructor private @Nullable SpelNodeImpl eatSumExpression() { SpelNodeImpl expr = eatProductExpression(); while (peekToken(TokenKind.PLUS, TokenKind.MINUS, TokenKind.INC)) { @@ -311,7 +311,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser { } // powerExpr : unaryExpression (POWER^ unaryExpression)? (INC || DEC) ; - @SuppressWarnings("NullAway") + @SuppressWarnings("NullAway") // Not null assertion performed in SpelNodeImpl constructor private @Nullable SpelNodeImpl eatPowerIncDecExpression() { SpelNodeImpl expr = eatUnaryExpression(); if (peekToken(TokenKind.POWER)) { @@ -331,7 +331,7 @@ class InternalSpelExpressionParser extends TemplateAwareExpressionParser { } // unaryExpression: (PLUS^ | MINUS^ | BANG^ | INC^ | DEC^) unaryExpression | primaryExpression ; - @SuppressWarnings("NullAway") + @SuppressWarnings("NullAway") // Not null assertion performed in SpelNodeImpl constructor private @Nullable SpelNodeImpl eatUnaryExpression() { if (peekToken(TokenKind.NOT, TokenKind.PLUS, TokenKind.MINUS)) { Token t = takeToken(); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java index fec2427874d..af16393aee6 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java @@ -154,7 +154,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { } @Override - @SuppressWarnings("NullAway") + @SuppressWarnings("NullAway") // Dataflow analysis limitation public TypedValue read(EvaluationContext context, @Nullable Object target, String name) throws AccessException { Assert.state(target != null, "Target must not be null"); Class type = (target instanceof Class clazz ? clazz : target.getClass()); @@ -507,7 +507,7 @@ public class ReflectivePropertyAccessor implements PropertyAccessor { *

Note: An optimized accessor is currently only usable for read attempts. * Do not call this method if you need a read-write accessor. */ - @SuppressWarnings("NullAway") + @SuppressWarnings("NullAway") // Dataflow analysis limitation public PropertyAccessor createOptimalAccessor(EvaluationContext context, @Nullable Object target, String name) { // Don't be clever for arrays or a null target... if (target == null) {