From e9e6e6920aa832fe225c058430cda518daf031c1 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Mon, 28 Oct 2019 23:12:32 +0000 Subject: [PATCH] <= part 2 --- .../main/groovy/com/muwire/core/search/ResultsParser.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/groovy/com/muwire/core/search/ResultsParser.groovy b/core/src/main/groovy/com/muwire/core/search/ResultsParser.groovy index 8be14be0..44796210 100644 --- a/core/src/main/groovy/com/muwire/core/search/ResultsParser.groovy +++ b/core/src/main/groovy/com/muwire/core/search/ResultsParser.groovy @@ -30,7 +30,7 @@ class ResultsParser { private static parseV1(Persona p, UUID uuid, def json) { if (json.name == null) throw new InvalidSearchResultException("name missing") - if (json.size == null || json.size == 0) + if (json.size == null || json.size <= 0) throw new InvalidSearchResultException("length missing") if (json.infohash == null) throw new InvalidSearchResultException("infohash missing") @@ -71,7 +71,7 @@ class ResultsParser { private static UIResultEvent parseV2(Persona p, UUID uuid, def json) { if (json.name == null) throw new InvalidSearchResultException("name missing") - if (json.size == null || json.size == 0) + if (json.size == null || json.size <= 0) throw new InvalidSearchResultException("length missing") if (json.infohash == null) throw new InvalidSearchResultException("infohash missing")