Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2020-11-16 14:12:14 +0300
committerNiedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com>2020-11-16 14:24:39 +0300
commit48aa5edb8df22b94b25c9366dd708893b987a991 (patch)
treed450b71ffdf5134f0963e37214effe2147ba0c24 /app/src/main/java/it/niedermann
parent236924118f271d8cab19a5bcc8e4837c7886bef9 (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')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/util/ProjectUtil.java3
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