diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2018-04-27 22:03:39 +0530 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-04-28 06:07:48 +0200 |
commit | 217ab5e17f31d78a41c575783c0779a54aafff63 (patch) | |
tree | 58a988282cda52a6ef0eadcd207eac854b93e649 /app/src/main/java/com/wireguard/config/Interface.java | |
parent | ba862b166bd30de8c15593ed3b8dfd457eb39d36 (diff) |
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>
Diffstat (limited to 'app/src/main/java/com/wireguard/config/Interface.java')
-rw-r--r-- | app/src/main/java/com/wireguard/config/Interface.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/config/Interface.java b/app/src/main/java/com/wireguard/config/Interface.java index 2ed2b4e6..5b125f51 100644 --- a/app/src/main/java/com/wireguard/config/Interface.java +++ b/app/src/main/java/com/wireguard/config/Interface.java @@ -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() { |