diff options
author | Stefan Niedermann <info@niedermann.it> | 2021-05-30 22:53:44 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2021-05-30 22:53:44 +0300 |
commit | a31f3eb3f6ba7198331f9c39339a1fdff34c0973 (patch) | |
tree | 1b815c5e20df0bed6c8910c6b9306d180b596679 /app/src/main | |
parent | 0923ab2f9c29eaabc8d1d6c6c5de6854564de07d (diff) |
Fix expected and actual results in ProjectUtilTest
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/util/ProjectUtil.java | 8 |
1 files changed, 4 insertions, 4 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 cea982ee5..781b5dabf 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 @@ -51,12 +51,12 @@ public class ProjectUtil { throw new IllegalArgumentException("trimmed url is empty"); } // extract important part - String[] splitByPrefix = url.split(".*(index\\.php/)?apps/deck(/#)?/board/"); + final String[] splitByPrefix = url.split(".*(index\\.php/)?apps/deck(/#)?/board/"); // split into board- and card part if (splitByPrefix.length < 2) { throw new IllegalArgumentException("This URL doesn't seem to be an URL containing the boardId: \"" + url + "\""); } - String[] splitBySeparator = splitByPrefix[1].split("/card/"); + final String[] splitBySeparator = splitByPrefix[1].split("/card/"); // remove any unexpected stuff if (splitBySeparator.length > 1 && splitBySeparator[1].contains("/")) { @@ -71,14 +71,14 @@ public class ProjectUtil { } // return result - long boardId = Long.parseLong(splitBySeparator[0]); + final long boardId = Long.parseLong(splitBySeparator[0]); if (boardId < 1) { throw new IllegalArgumentException("Invalid boardId \"" + boardId + "\" for url \"" + url + "\"."); } if (splitBySeparator.length == 1) { return new long[]{boardId}; } else if (splitBySeparator.length == 2) { - long cardId = Long.parseLong(splitBySeparator[1]); + final long cardId = Long.parseLong(splitBySeparator[1]); if (cardId > 0) { return new long[]{boardId, cardId}; } else { |