From f376d1b525de811c79eb7be7aa0709c3ad1dce41 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Tue, 3 Jun 2025 12:58:45 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20@=E2=81=A0Contract=20declaration=20for?= =?UTF-8?q?=20CodeFlow.isIntegerForNumericOp()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the Number parameter is not @⁠Nullable, the @⁠Contract declaration is unnecessary. Closes gh-34985 --- .../java/org/springframework/expression/spel/CodeFlow.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java b/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java index 85e9bb61db..c837d57d5b 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -691,9 +691,8 @@ public class CodeFlow implements Opcodes { * Determine whether the given number is to be considered as an integer * for the purposes of a numeric operation at the bytecode level. * @param number the number to check - * @return {@code true} if it is an {@link Integer}, {@link Short} or {@link Byte} + * @return {@code true} if it is an {@link Integer}, {@link Short}, or {@link Byte} */ - @Contract("null -> false") public static boolean isIntegerForNumericOp(Number number) { return (number instanceof Integer || number instanceof Short || number instanceof Byte); }