Repository: camel Updated Branches: refs/heads/camel-2.19.x c16ab4d04 -> 6ae3b8faa refs/heads/master ce19f6417 -> fbf76f60c
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/6ae3b8fa Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6ae3b8fa Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6ae3b8fa Branch: refs/heads/camel-2.19.x Commit: 6ae3b8faa310409a680d3a60c98536514549d89e Parents: c16ab4d Author: Sean Haynes <s.a.hay...@ieee.org> Authored: Mon Jul 10 15:07:45 2017 -0400 Committer: Claus Ibsen <davscl...@apache.org> Committed: Mon Jul 10 22:05:28 2017 +0200 ---------------------------------------------------------------------- .../component/olingo2/api/impl/Olingo2AppImpl.java | 16 ++++++---------- .../component/olingo4/api/impl/Olingo4AppImpl.java | 8 ++++++-- 2 files changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/6ae3b8fa/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 59218a7..9cfe7c7 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)); } } http://git-wip-us.apache.org/repos/asf/camel/blob/6ae3b8fa/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java ---------------------------------------------------------------------- diff --git a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java index bea94b5..d3afcee 100644 --- a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java +++ b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java @@ -340,8 +340,10 @@ public final class Olingo4AppImpl implements Olingo4App { private <T> void readContent(UriInfo uriInfo, InputStream content, Olingo4ResponseHandler<T> responseHandler) { try { responseHandler.onResponse(this.<T> readContent(uriInfo, content)); - } catch (ODataException e) { + } catch (Exception e) { responseHandler.onException(e); + } catch (Error e) { + responseHandler.onException(new ODataException("Runtime Error Occurred", e)); } } @@ -493,8 +495,10 @@ public final class Olingo4AppImpl implements Olingo4App { } }); - } catch (ODataException e) { + } catch (Exception e) { responseHandler.onException(e); + } catch (Error e) { + responseHandler.onException(new ODataException("Runtime Error Occurred", e)); } }