diff options
author | Harsh Shandilya <harsh@prjkt.io> | 2018-08-01 11:25:08 +0530 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-26 11:04:01 -0600 |
commit | b87d229242b848018cfb596c86111a0fabc25e5e (patch) | |
tree | ba4590622e93e8e28dbfc922257a59106539818e /app/src/main/java | |
parent | 03415e63b4fbd34ee73fd83726c57782b81a2756 (diff) |
Supress false-positive DefaultLocale warnings
We decided in 402472237e8f that it's a bad idea for our use-case
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
Diffstat (limited to 'app/src/main/java')
-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 | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/config/Attribute.java b/app/src/main/java/com/wireguard/config/Attribute.java index be068e80..0f89cc94 100644 --- a/app/src/main/java/com/wireguard/config/Attribute.java +++ b/app/src/main/java/com/wireguard/config/Attribute.java @@ -6,6 +6,7 @@ package com.wireguard.config; +import android.annotation.SuppressLint; import android.support.annotation.Nullable; import android.text.TextUtils; @@ -66,10 +67,12 @@ public enum Attribute { return LIST_SEPARATOR_PATTERN.split(string.trim()); } + @SuppressLint("DefaultLocale") public String composeWith(@Nullable final Object value) { return String.format("%s = %s%n", token, value); } + @SuppressLint("DefaultLocale") public String composeWith(final int value) { return String.format("%s = %d%n", token, value); } diff --git a/app/src/main/java/com/wireguard/config/Peer.java b/app/src/main/java/com/wireguard/config/Peer.java index 1ed615e6..8fcaf6ee 100644 --- a/app/src/main/java/com/wireguard/config/Peer.java +++ b/app/src/main/java/com/wireguard/config/Peer.java @@ -6,6 +6,7 @@ package com.wireguard.config; +import android.annotation.SuppressLint; import android.content.Context; import android.databinding.BaseObservable; import android.databinding.Bindable; @@ -71,6 +72,7 @@ public class Peer { return endpoint; } + @SuppressLint("DefaultLocale") @Nullable private String getEndpointString() { if (endpoint == null) @@ -102,6 +104,7 @@ public class Peer { return publicKey; } + @SuppressLint("DefaultLocale") public String getResolvedEndpointString() throws UnknownHostException { if (endpoint == null) throw new UnknownHostException("{empty}"); |