From 6d3f1e00a5347ec47ed0a39c10a350743518a07a Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 1 Aug 2018 11:25:08 +0530 Subject: Supress false-positive DefaultLocale warnings We decided in 402472237e8f that it's a bad idea for our use-case Signed-off-by: Harsh Shandilya --- app/src/main/java/com/wireguard/config/Attribute.java | 3 +++ app/src/main/java/com/wireguard/config/Peer.java | 3 +++ 2 files changed, 6 insertions(+) (limited to 'app/src') 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}"); -- cgit v1.2.3