From 27e7aad159c9081b6af2b84430a6f50bc01ab987 Mon Sep 17 00:00:00 2001 From: Fynn Godau Date: Thu, 4 Jun 2020 19:04:25 +0200 Subject: [PATCH] Bandcamp: Improve code style --- .../services/bandcamp/extractors/BandcampExtractorHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java index cfe5c2df2..c9e21b31f 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/BandcampExtractorHelper.java @@ -9,6 +9,7 @@ import com.grack.nanojson.JsonWriter; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.exceptions.ReCaptchaException; +import org.schabi.newpipe.extractor.utils.Utils; import java.io.IOException; import java.util.ArrayList; @@ -87,7 +88,7 @@ public class BandcampExtractorHelper { // Remove empty strings ArrayList list = new ArrayList<>(Arrays.asList(strings)); for (int i = list.size() - 1; i >= 0; i--) { - if (list.get(i) == null || list.get(i).isEmpty() || list.get(i).equals("null")) { + if (Utils.isNullOrEmpty(list) || list.get(i).equals("null")) { list.remove(i); } }