Commit 593a709a authored by akwizgran's avatar akwizgran

Remove redundant regex.

parent 322fefb2
Pipeline #3290 passed with stage
in 6 minutes and 52 seconds
......@@ -13,17 +13,12 @@ import org.briarproject.bramble.api.lifecycle.LifecycleManager;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import java.util.Collection;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
@NotNullByDefault
public interface ContactManager {
int LINK_LENGTH = 64;
Pattern LINK_REGEX =
Pattern.compile("(briar://)?([a-z2-7]{" + LINK_LENGTH + "})");
/**
* Registers a hook to be called whenever a contact is added or removed.
* This method should be called before
......
......@@ -22,7 +22,7 @@ import javax.inject.Inject;
import static java.util.logging.Level.WARNING;
import static java.util.logging.Logger.getLogger;
import static org.briarproject.bramble.api.contact.ContactManager.LINK_REGEX;
import static org.briarproject.bramble.api.contact.HandshakeLinkConstants.LINK_REGEX;
import static org.briarproject.bramble.util.LogUtils.logException;
@NotNullByDefault
......@@ -105,7 +105,7 @@ public class AddContactViewModel extends AndroidViewModel {
});
}
public LiveData<Boolean> getAddContactResult() {
LiveData<Boolean> getAddContactResult() {
return addContactResult;
}
......
......@@ -29,7 +29,7 @@ import javax.inject.Inject;
import static android.content.Context.CLIPBOARD_SERVICE;
import static android.widget.Toast.LENGTH_SHORT;
import static java.util.Objects.requireNonNull;
import static org.briarproject.bramble.api.contact.ContactManager.LINK_REGEX;
import static org.briarproject.bramble.api.contact.HandshakeLinkConstants.LINK_REGEX;
import static org.briarproject.briar.android.util.UiUtils.observeOnce;
@MethodsNotNullByDefault
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment