File tree 2 files changed +14
-5
lines changed
src/main/java/org/elasticsearch/cloud/gce/blobstore
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 22
22
import com .google .api .client .googleapis .media .MediaHttpUploader ;
23
23
import com .google .api .services .storage .Storage ;
24
24
import com .google .api .services .storage .model .StorageObject ;
25
- import org .apache .lucene .util .IOUtils ;
26
25
import org .elasticsearch .cloud .gce .GoogleCloudStorageService ;
27
26
28
27
import java .io .IOException ;
@@ -75,7 +74,13 @@ public void run() {
75
74
76
75
} finally {
77
76
done .countDown ();
78
- IOUtils .closeWhileHandlingException (input );
77
+ if (input != null ) {
78
+ try {
79
+ input .close ();
80
+ } catch (IOException e ) {
81
+ // Ignore
82
+ }
83
+ }
79
84
}
80
85
}
81
86
Original file line number Diff line number Diff line change 19
19
20
20
package org .elasticsearch .cloud .gce .blobstore ;
21
21
22
- import org .apache .lucene .util .IOUtils ;
23
22
import org .elasticsearch .common .Preconditions ;
24
23
25
24
import java .io .IOException ;
@@ -82,7 +81,13 @@ public void write(int b) throws IOException {
82
81
83
82
@ Override
84
83
public void close () throws IOException {
85
- IOUtils .closeWhileHandlingException (output );
84
+ if (output != null ) {
85
+ try {
86
+ output .close ();
87
+ } catch (IOException e ) {
88
+ // Ignore
89
+ }
90
+ }
86
91
87
92
if (input != null ) {
88
93
try {
@@ -93,7 +98,6 @@ public void close() throws IOException {
93
98
checkForConcurrentUploadErrors ();
94
99
95
100
} finally {
96
- IOUtils .closeWhileHandlingException (output );
97
101
output = null ;
98
102
input = null ;
99
103
upload = null ;
You can’t perform that action at this time.
0 commit comments