diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/com/wireguard/config/Attribute.java | 3 | ||||
-rw-r--r-- | app/src/main/java/com/wireguard/config/Peer.java | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/app/src/main/java/com/wireguard/config/Attribute.java b/app/src/main/java/com/wireguard/config/Attribute.java index e8b731b5..b35df100 100644 --- a/app/src/main/java/com/wireguard/config/Attribute.java +++ b/app/src/main/java/com/wireguard/config/Attribute.java @@ -10,7 +10,6 @@ import android.support.annotation.Nullable; import android.text.TextUtils; import java.util.HashMap; -import java.util.Locale; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -71,7 +70,7 @@ public enum Attribute { } public String composeWith(final int value) { - return String.format(Locale.getDefault(), "%s = %d%n", token, value); + return String.format("%s = %d%n", token, value); } public <T> String composeWith(final Iterable<T> value) { diff --git a/app/src/main/java/com/wireguard/config/Peer.java b/app/src/main/java/com/wireguard/config/Peer.java index b3532eeb..2a4f4465 100644 --- a/app/src/main/java/com/wireguard/config/Peer.java +++ b/app/src/main/java/com/wireguard/config/Peer.java @@ -25,7 +25,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.List; -import java.util.Locale; import java9.lang.Iterables; @@ -72,7 +71,7 @@ public class Peer { private String getEndpointString() { if (endpoint == null) return null; - return String.format(Locale.getDefault(), "%s:%d", endpoint.getHostString(), endpoint.getPort()); + return String.format("%s:%d", endpoint.getHostString(), endpoint.getPort()); } public int getPersistentKeepalive() { @@ -104,12 +103,10 @@ public class Peer { if (endpoint.isUnresolved()) throw new UnknownHostException(endpoint.getHostString()); if (endpoint.getAddress() instanceof Inet6Address) - return String.format(Locale.getDefault(), - "[%s]:%d", + return String.format("[%s]:%d", endpoint.getAddress().getHostAddress(), endpoint.getPort()); - return String.format(Locale.getDefault(), - "%s:%d", + return String.format("%s:%d", endpoint.getAddress().getHostAddress(), endpoint.getPort()); } |