summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/config/Interface.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/wireguard/config/Interface.java')
-rw-r--r--app/src/main/java/com/wireguard/config/Interface.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/src/main/java/com/wireguard/config/Interface.java b/app/src/main/java/com/wireguard/config/Interface.java
index 3f775389..03121072 100644
--- a/app/src/main/java/com/wireguard/config/Interface.java
+++ b/app/src/main/java/com/wireguard/config/Interface.java
@@ -172,13 +172,7 @@ public class Interface extends BaseObservable implements Parcelable {
public void addDnses(String[] dnses) {
if (dnses != null && dnses.length > 0) {
for (final String dns : dnses) {
- if (dns.isEmpty())
- throw new IllegalArgumentException("DNS is empty");
- try {
- this.dnsList.add(InetAddress.getByName(dns));
- } catch (UnknownHostException e) {
- throw new IllegalArgumentException(e);
- }
+ this.dnsList.add(Attribute.parseIPString(dns));
}
}
notifyPropertyChanged(BR.dnses);