style: include NAB_NEEDLESS_BOXING_PARSE (#5184)

This commit is contained in:
Piotr Idzik 2024-05-28 08:47:51 +02:00 committed by GitHub
parent 70c1d97ab1
commit 92887a10c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View File

@ -225,9 +225,6 @@
<Match> <Match>
<Bug pattern="ENMI_EQUALS_ON_ENUM" /> <Bug pattern="ENMI_EQUALS_ON_ENUM" />
</Match> </Match>
<Match>
<Bug pattern="NAB_NEEDLESS_BOXING_PARSE" />
</Match>
<Match> <Match>
<Bug pattern="IMC_IMMATURE_CLASS_VAR_NAME" /> <Bug pattern="IMC_IMMATURE_CLASS_VAR_NAME" />
</Match> </Match>

View File

@ -34,7 +34,7 @@ public final class HarshadNumber {
* {@code false} * {@code false}
*/ */
public static boolean isHarshad(String s) { public static boolean isHarshad(String s) {
long n = Long.valueOf(s); final Long n = Long.valueOf(s);
if (n <= 0) return false; if (n <= 0) return false;
int sumOfDigits = 0; int sumOfDigits = 0;