From 2bfe0b8d1ad0a8e52f3a61a1999ba8f9030c3702 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Sun, 13 Sep 2020 06:50:06 +0200 Subject: [PATCH] Fix create issue crash on label added and removed (#685) Merge branch 'master' into fix-create-issue-crash Merge branch 'master' of codeberg.org:gitnex/GitNex into master Fix crash when label added and removed Merge branch 'master' of codeberg.org:gitnex/GitNex into master Merge branch 'master' of codeberg.org:gitnex/GitNex into master endline Co-authored-by: M M Arif Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/685 --- .../java/org/mian/gitnex/activities/CreateIssueActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/mian/gitnex/activities/CreateIssueActivity.java b/app/src/main/java/org/mian/gitnex/activities/CreateIssueActivity.java index cce00a8c..b5db546b 100644 --- a/app/src/main/java/org/mian/gitnex/activities/CreateIssueActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/CreateIssueActivity.java @@ -199,9 +199,9 @@ public class CreateIssueActivity extends BaseActivity implements View.OnClickLis } int[] integers; - if (!newIssueLabelsIdHolderForm.equals("")) { + if (!newIssueLabelsIdHolderForm.equals("") && !newIssueLabelsIdHolderForm.equals("[]")) { - String[] items = newIssueLabelsIdHolderForm.replaceAll("\\[", "").replaceAll("\\]", "").replaceAll("\\s", "").split(","); + String[] items = newIssueLabelsIdHolderForm.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\\s", "").split(","); integers = new int[items.length]; for (int i = 0; i < integers.length; i++) { integers[i] = Integer.parseInt(items[i]);