From 0d8c3e66040eadc30422952b76b867e5c3b5abfa Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 19 Jul 2020 17:41:43 +0200 Subject: [PATCH] Add close because full stream is read --- OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java index d302c91da7..925f886a19 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/Algorithms.java @@ -41,11 +41,11 @@ public class Algorithms { private static final int BUFFER_SIZE = 1024; private static final Log log = PlatformUtil.getLog(Algorithms.class); - public static boolean isEmpty(Collection c) { + public static boolean isEmpty(Collection c) { return c == null || c.size() == 0; } - public static boolean isEmpty(Map map) { + public static boolean isEmpty(Map map) { return map == null || map.size() == 0; } @@ -498,6 +498,7 @@ public class Algorithms { } responseBody.append(s); } + i.close(); } return responseBody; }