Remove @⁠Contract declaration for CodeFlow.isIntegerForNumericOp()

Since the Number parameter is not @⁠Nullable, the @⁠Contract declaration
is unnecessary.

Closes gh-34985
This commit is contained in:
Sam Brannen 2025-06-03 12:58:45 +02:00
parent 707b7698ce
commit f376d1b525
1 changed files with 2 additions and 3 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 * Determine whether the given number is to be considered as an integer
* for the purposes of a numeric operation at the bytecode level. * for the purposes of a numeric operation at the bytecode level.
* @param number the number to check * @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) { public static boolean isIntegerForNumericOp(Number number) {
return (number instanceof Integer || number instanceof Short || number instanceof Byte); return (number instanceof Integer || number instanceof Short || number instanceof Byte);
} }