diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2018-08-01 11:25:08 +0530 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-26 11:04:01 -0600 |
commit | 6d3f1e00a5347ec47ed0a39c10a350743518a07a (patch) | |
tree | ba4590622e93e8e28dbfc922257a59106539818e | |
parent | c38f6c471d640a73e9c512b64c22001cdec3ba65 (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 <me@msfjarvis.dev>
-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}"); |