Tunnel: The name passed to isNameValid is never null

Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
Samuel Holland 2018-01-07 00:25:49 -06:00
parent 2f5494d47c
commit 1862ff0bbe

View File

@ -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() {