config: Minor cleanup
- Stop implicitly assuming locales in String.format - Cleanup method visibilities - Improve uses of Integer methods - Remove unused getToken method Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
committed by
Jason A. Donenfeld
parent
ba862b166b
commit
217ab5e17f
@@ -151,7 +151,7 @@ public class Interface implements Parcelable {
|
||||
for (int i = 0; i < dnsItems; ++i) {
|
||||
try {
|
||||
dnsList.add(InetAddress.getByAddress(in.createByteArray()));
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
listenPort = in.readInt();
|
||||
@@ -198,7 +198,7 @@ public class Interface implements Parcelable {
|
||||
private String getListenPortString() {
|
||||
if (listenPort == 0)
|
||||
return null;
|
||||
return new Integer(listenPort).toString();
|
||||
return Integer.valueOf(listenPort).toString();
|
||||
}
|
||||
|
||||
public int getMtu() {
|
||||
@@ -208,7 +208,7 @@ public class Interface implements Parcelable {
|
||||
private String getMtuString() {
|
||||
if (mtu == 0)
|
||||
return null;
|
||||
return new Integer(mtu).toString();
|
||||
return Integer.toString(mtu);
|
||||
}
|
||||
|
||||
public String getPrivateKey() {
|
||||
|
||||
Reference in New Issue
Block a user