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

camel git commit: CAMEL-11424 Fix potential endless wait in camel-olingo2 and camel-olingo4

Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x a6c3c86a8 -> c4c0e31f9


CAMEL-11424 Fix potential endless wait in camel-olingo2 and
camel-olingo4


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

Branch: refs/heads/camel-2.18.x
Commit: c4c0e31f9c43988535e8825a48d87e9ed14c4de9
Parents: a6c3c86
Author: Sean Haynes <s....@ieee.org>
Authored: Mon Jul 10 15:07:45 2017 -0400
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jul 10 22:13:29 2017 +0200

----------------------------------------------------------------------
 .../component/olingo2/api/impl/Olingo2AppImpl.java  | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c4c0e31f/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
----------------------------------------------------------------------
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
index e641162..028ff5c 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
@@ -332,10 +332,10 @@ public final class Olingo2AppImpl implements Olingo2App {
     private <T> void readContent(UriInfoWithType uriInfo, InputStream content, Olingo2ResponseHandler<T> responseHandler) {
         try {
             responseHandler.onResponse(this.<T>readContent(uriInfo, content));
-        } catch (EntityProviderException e) {
-            responseHandler.onException(e);
-        } catch (ODataApplicationException e) {
+        } catch (Exception e) {
             responseHandler.onException(e);
+        } catch (Error e) {
+            responseHandler.onException(new ODataApplicationException("Runtime Error Occurred", Locale.ENGLISH, e));
         }
     }
 
@@ -593,14 +593,10 @@ public final class Olingo2AppImpl implements Olingo2App {
                     }
                 }
             });
-        } catch (ODataException e) {
-            responseHandler.onException(e);
-        } catch (URISyntaxException e) {
-            responseHandler.onException(e);
-        } catch (UnsupportedEncodingException e) {
-            responseHandler.onException(e);
-        } catch (IOException e) {
+        } catch (Exception e) {
             responseHandler.onException(e);
+        } catch (Error e) {
+            responseHandler.onException(new ODataApplicationException("Runtime Error Occurred", Locale.ENGLISH, e));
         }
     }