diff --git a/common/src/main/java/apoc/export/util/LimitedSizeInputStream.java b/common/src/main/java/apoc/export/util/LimitedSizeInputStream.java index d20ffb531..69b737922 100644 --- a/common/src/main/java/apoc/export/util/LimitedSizeInputStream.java +++ b/common/src/main/java/apoc/export/util/LimitedSizeInputStream.java @@ -58,6 +58,12 @@ public int read(byte b[], int off, int len) throws IOException { return i; } + @Override + public void close() throws IOException { + stream.close(); + super.close(); + } + private void incrementCounter(int size) throws IOException { // in some test cases, e.g. UtilIT.redirectShouldWorkWhenProtocolNotChangesWithUrlLocation, // the StreamConnection.getLength() returns `-1` because of content length not known,