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>
This commit is contained in:
Harsh Shandilya 2018-08-01 11:25:08 +05:30 committed by Jason A. Donenfeld
parent c38f6c471d
commit 6d3f1e00a5
2 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,7 @@
package com.wireguard.config; package com.wireguard.config;
import android.annotation.SuppressLint;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.text.TextUtils; import android.text.TextUtils;
@ -66,10 +67,12 @@ public enum Attribute {
return LIST_SEPARATOR_PATTERN.split(string.trim()); return LIST_SEPARATOR_PATTERN.split(string.trim());
} }
@SuppressLint("DefaultLocale")
public String composeWith(@Nullable final Object value) { public String composeWith(@Nullable final Object value) {
return String.format("%s = %s%n", token, value); return String.format("%s = %s%n", token, value);
} }
@SuppressLint("DefaultLocale")
public String composeWith(final int value) { public String composeWith(final int value) {
return String.format("%s = %d%n", token, value); return String.format("%s = %d%n", token, value);
} }

View File

@ -6,6 +6,7 @@
package com.wireguard.config; package com.wireguard.config;
import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import android.databinding.BaseObservable; import android.databinding.BaseObservable;
import android.databinding.Bindable; import android.databinding.Bindable;
@ -71,6 +72,7 @@ public class Peer {
return endpoint; return endpoint;
} }
@SuppressLint("DefaultLocale")
@Nullable @Nullable
private String getEndpointString() { private String getEndpointString() {
if (endpoint == null) if (endpoint == null)
@ -102,6 +104,7 @@ public class Peer {
return publicKey; return publicKey;
} }
@SuppressLint("DefaultLocale")
public String getResolvedEndpointString() throws UnknownHostException { public String getResolvedEndpointString() throws UnknownHostException {
if (endpoint == null) if (endpoint == null)
throw new UnknownHostException("{empty}"); throw new UnknownHostException("{empty}");