You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2019/10/10 07:10:49 UTC

[lucene-solr] branch branch_8_3 updated: SOLR-13293: Fix compile error on Java 8

This is an automated email from the ASF dual-hosted git repository.

datcm pushed a commit to branch branch_8_3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8_3 by this push:
     new 46e2da8  SOLR-13293: Fix compile error on Java 8
46e2da8 is described below

commit 46e2da8d1b880d6225f3c374f985ec1683cbf4fe
Author: Cao Manh Dat <da...@apache.org>
AuthorDate: Thu Oct 10 08:10:16 2019 +0100

    SOLR-13293: Fix compile error on Java 8
---
 .../solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
index 7165e9b..16ab919 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
@@ -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
+        }
       }
     }
   }