diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-11-16 14:12:14 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2020-11-16 14:24:39 +0300 |
commit | 48aa5edb8df22b94b25c9366dd708893b987a991 (patch) | |
tree | d450b71ffdf5134f0963e37214effe2147ba0c24 /app/src/main/java/it/niedermann/nextcloud/deck/util | |
parent | 236924118f271d8cab19a5bcc8e4837c7886bef9 (diff) |
#707 Add some unit tests for cases where the URL doesn't contain a # character
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/util')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/util/ProjectUtil.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/util/ProjectUtil.java b/app/src/main/java/it/niedermann/nextcloud/deck/util/ProjectUtil.java index 52c680c0f..3161c8920 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/util/ProjectUtil.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/util/ProjectUtil.java @@ -1,7 +1,6 @@ package it.niedermann.nextcloud.deck.util; import android.net.Uri; -import android.text.TextUtils; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -47,7 +46,7 @@ public class ProjectUtil { throw new IllegalArgumentException("provided url is null"); } url = url.trim(); - if (TextUtils.isEmpty(url)) { + if (url.length() == 0) { throw new IllegalArgumentException("trimmed url is empty"); } // extract important part |