summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-01-07 00:25:49 -0600
committerSamuel Holland <samuel@sholland.org>2018-01-07 00:25:49 -0600
commit19d49c6b3ad29e015067debf9b2d204dcb0c25eb (patch)
tree57e1ce33c950a572476b66fe14e1e616b7c3b41f /app/src/main/java
parent6126860edbe1b6b7f1a14611103dfe18396863d3 (diff)
Tunnel: The name passed to isNameValid is never null
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/wireguard/android/model/Tunnel.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/wireguard/android/model/Tunnel.java b/app/src/main/java/com/wireguard/android/model/Tunnel.java
index 7a0972c3..9bb7406c 100644
--- a/app/src/main/java/com/wireguard/android/model/Tunnel.java
+++ b/app/src/main/java/com/wireguard/android/model/Tunnel.java
@@ -37,8 +37,8 @@ public class Tunnel extends BaseObservable implements Keyed<String> {
this.state = state;
}
- public static boolean isNameValid(final CharSequence name) {
- return name != null && NAME_PATTERN.matcher(name).matches();
+ public static boolean isNameValid(@NonNull final CharSequence name) {
+ return NAME_PATTERN.matcher(name).matches();
}
public CompletionStage<Void> delete() {