Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2012-04-17 17:08:54 -0400
committerKevin Sawicki2012-04-17 17:08:54 -0400
commit8401d7cb64886144711cae1f43912e97f551a92e (patch)
tree83906b5005bb9184ec71c6540b18eb60601fe72b
parent2d09bf96485bb3fab41063a5a3cd7fa37ad84fe7 (diff)
downloadegit-github-8401d7cb64886144711cae1f43912e97f551a92e.tar.gz
egit-github-8401d7cb64886144711cae1f43912e97f551a92e.tar.xz
egit-github-8401d7cb64886144711cae1f43912e97f551a92e.zip
Ignore exceptions when closing output stream
This maintains consistency with how exceptions are handled when closing the input stream. Change-Id: Ie49a124a2e4e16b1b850c246a298c0be681f0914
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
index cdcd3a3e..83279b74 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
@@ -569,8 +569,13 @@ public class GitHubClient {
request.getOutputStream(), bufferSize);
try {
output.write(data);
+ output.flush();
} finally {
- output.close();
+ try {
+ output.close();
+ } catch (IOException ignored) {
+ // Ignored
+ }
}
} else
request.setFixedLengthStreamingMode(0);

Back to the top