Skip to content

Commit

Permalink
fix: address static analysis warning correctly this time
Browse files Browse the repository at this point in the history
  • Loading branch information
rhwood committed Jul 16, 2019
1 parent 73ccf49 commit 1739bc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/src/jmri/jmrix/lenz/XNetSensorManager.java
Expand Up @@ -134,7 +134,7 @@ public String validateSystemNameFormat(String name, Locale locale) {
Bundle.getMessage(locale, "SystemNameInvalidAddress", name));
}
try {
int address = Integer.valueOf(parts[0]);
int address = Integer.parseInt(parts[0]);
if (address < 1 || address > 127) {
throw new NamedBean.BadSystemNameException(
Bundle.getMessage(Locale.ENGLISH, "SystemNameInvalidModule", name, parts[0]),
Expand All @@ -146,7 +146,7 @@ public String validateSystemNameFormat(String name, Locale locale) {
Bundle.getMessage(locale, "SystemNameInvalidModule", name, parts[0]));
}
try {
int bit = Integer.valueOf(parts[1]);
int bit = Integer.parseInt(parts[1]);
if (bit < 1 || bit > 8) {
throw new NamedBean.BadSystemNameException(
Bundle.getMessage(Locale.ENGLISH, "SystemNameInvalidBit", name, parts[1]),
Expand Down

0 comments on commit 1739bc6

Please sign in to comment.