SOLR-13293: Fix compile error on Java 8

This commit is contained in:
Cao Manh Dat 2019-10-10 08:10:16 +01:00
parent 8864320e39
commit 21dfdac46c

View File

@ -295,7 +295,7 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
private void consumeFully(InputStream is) {
if (is != null) {
try (is) {
try {
// make sure the stream is full read
is.skip(is.available());
while (is.read() != -1) {
@ -304,6 +304,12 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
// nothing to do then
} catch (IOException e) {
// quiet
} finally {
try {
is.close();
} catch (IOException e) {
// quiet
}
}
}
}