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:
parent
c38f6c471d
commit
6d3f1e00a5
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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}");
|
||||||
|
Loading…
Reference in New Issue
Block a user