We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
NAB_NEEDLESS_BOXING_PARSE
1 parent 70c1d97 commit 708f705Copy full SHA for 708f705
spotbugs-exclude.xml
@@ -225,9 +225,6 @@
225
<Match>
226
<Bug pattern="ENMI_EQUALS_ON_ENUM" />
227
</Match>
228
- <Match>
229
- <Bug pattern="NAB_NEEDLESS_BOXING_PARSE" />
230
- </Match>
231
232
<Bug pattern="IMC_IMMATURE_CLASS_VAR_NAME" />
233
src/main/java/com/thealgorithms/maths/HarshadNumber.java
@@ -34,7 +34,7 @@ public static boolean isHarshad(long n) {
34
* {@code false}
35
*/
36
public static boolean isHarshad(String s) {
37
- long n = Long.valueOf(s);
+ final Long n = Long.valueOf(s);
38
if (n <= 0) return false;
39
40
int sumOfDigits = 0;
0 commit comments