camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zregv...@apache.org
Subject camel git commit: CAMEL-11668: CompositeApiClient class in the ca...
Date Mon, 14 Aug 2017 19:54:06 GMT
Repository: camel
Updated Branches:
  refs/heads/master 05ee08956 -> 7c3dba855


CAMEL-11668: CompositeApiClient class in the ca...

...mel-salesforces component cannot close a null InputStream

Cleaned up to use `IOHelper.close` instead.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7c3dba85
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7c3dba85
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7c3dba85

Branch: refs/heads/master
Commit: 7c3dba855c70467030ffecfe768db91f988d4c2b
Parents: 05ee089
Author: Zoran Regvart <zregvart@apache.org>
Authored: Mon Aug 14 21:54:02 2017 +0200
Committer: Zoran Regvart <zregvart@apache.org>
Committed: Mon Aug 14 21:54:02 2017 +0200

----------------------------------------------------------------------
 .../salesforce/internal/client/DefaultCompositeApiClient.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7c3dba85/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClient.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClient.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClient.java
index 8255129..1337124 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClient.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClient.java
@@ -55,6 +55,7 @@ import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.api.utils.Version;
 import org.apache.camel.component.salesforce.internal.PayloadFormat;
 import org.apache.camel.component.salesforce.internal.SalesforceSession;
+import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.eclipse.jetty.client.api.ContentProvider;
 import org.eclipse.jetty.client.api.Request;
@@ -250,11 +251,7 @@ public class DefaultCompositeApiClient extends AbstractClientBase implements
Com
             LOG.warn("Unable to read response from the Composite API", e);
             return Optional.empty();
         } finally {
-            try {
-            	if (responseStream != null)
-                responseStream.close();
-            } catch (final IOException ignored) {
-            }
+            IOHelper.close(responseStream);
         }
     }
 


Mime
View raw message