Skip to content

Commit f376d1b

Browse files
committed
Remove @⁠Contract declaration for CodeFlow.isIntegerForNumericOp()
Since the Number parameter is not @⁠Nullable, the @⁠Contract declaration is unnecessary. Closes gh-34985
1 parent 707b769 commit f376d1b

File tree

1 file changed

+2
-3
lines changed
  • spring-expression/src/main/java/org/springframework/expression/spel

1 file changed

+2
-3
lines changed

spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -691,9 +691,8 @@ public static boolean isPrimitiveOrUnboxableSupportedNumber(@Nullable String des
691691
* Determine whether the given number is to be considered as an integer
692692
* for the purposes of a numeric operation at the bytecode level.
693693
* @param number the number to check
694-
* @return {@code true} if it is an {@link Integer}, {@link Short} or {@link Byte}
694+
* @return {@code true} if it is an {@link Integer}, {@link Short}, or {@link Byte}
695695
*/
696-
@Contract("null -> false")
697696
public static boolean isIntegerForNumericOp(Number number) {
698697
return (number instanceof Integer || number instanceof Short || number instanceof Byte);
699698
}

0 commit comments

Comments
 (0)