avoid unnecessary boxing
Change-Id: I1fd423ea521149e24ce159af48bc6d1da6f37646
Showing
2 changed files
with
2 additions
and
2 deletions
... | @@ -121,7 +121,7 @@ public final class IpAddress { | ... | @@ -121,7 +121,7 @@ public final class IpAddress { |
121 | 121 | ||
122 | int mask = DEFAULT_MASK; | 122 | int mask = DEFAULT_MASK; |
123 | if (parts.length == 2) { | 123 | if (parts.length == 2) { |
124 | - mask = Integer.valueOf(parts[1]); | 124 | + mask = Integer.parseInt(parts[1]); |
125 | if (mask > MAX_INET_MASK) { | 125 | if (mask > MAX_INET_MASK) { |
126 | throw new IllegalArgumentException( | 126 | throw new IllegalArgumentException( |
127 | "Value of subnet mask cannot exceed " | 127 | "Value of subnet mask cannot exceed " | ... | ... |
... | @@ -120,7 +120,7 @@ public final class IpPrefix { | ... | @@ -120,7 +120,7 @@ public final class IpPrefix { |
120 | 120 | ||
121 | int mask = DEFAULT_MASK; | 121 | int mask = DEFAULT_MASK; |
122 | if (parts.length == 2) { | 122 | if (parts.length == 2) { |
123 | - mask = Integer.valueOf(parts[1]); | 123 | + mask = Integer.parseInt(parts[1]); |
124 | if (mask > MAX_INET_MASK) { | 124 | if (mask > MAX_INET_MASK) { |
125 | throw new IllegalArgumentException( | 125 | throw new IllegalArgumentException( |
126 | "Value of subnet mask cannot exceed " | 126 | "Value of subnet mask cannot exceed " | ... | ... |
-
Please register or login to post a comment