From 92887a10c2a1d7b06cd3c6c273a00dd2ea42ad1a Mon Sep 17 00:00:00 2001 From: Piotr Idzik <65706193+vil02@users.noreply.github.com> Date: Tue, 28 May 2024 08:47:51 +0200 Subject: [PATCH] style: include `NAB_NEEDLESS_BOXING_PARSE` (#5184) --- spotbugs-exclude.xml | 3 --- src/main/java/com/thealgorithms/maths/HarshadNumber.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml index 32a12926..99a24bbf 100644 --- a/spotbugs-exclude.xml +++ b/spotbugs-exclude.xml @@ -225,9 +225,6 @@ - - - diff --git a/src/main/java/com/thealgorithms/maths/HarshadNumber.java b/src/main/java/com/thealgorithms/maths/HarshadNumber.java index e063c860..0b1ba128 100644 --- a/src/main/java/com/thealgorithms/maths/HarshadNumber.java +++ b/src/main/java/com/thealgorithms/maths/HarshadNumber.java @@ -34,7 +34,7 @@ public final class HarshadNumber { * {@code false} */ public static boolean isHarshad(String s) { - long n = Long.valueOf(s); + final Long n = Long.valueOf(s); if (n <= 0) return false; int sumOfDigits = 0;