You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/01/17 10:55:24 UTC

[camel] branch master updated: CAMEL-13072 remove the exception block

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new c219473  CAMEL-13072 remove the exception block
c219473 is described below

commit c219473db902f7675fc1ac832bd0689a93745a0e
Author: Gandhi <vg...@LAMU02W82E9HTD6.uhc.com>
AuthorDate: Thu Jan 17 13:52:24 2019 +0530

    CAMEL-13072 remove the exception block
---
 .../src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java     | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
index 5ba24ef..89959de 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
@@ -317,12 +317,7 @@ public class DefaultUnitOfWork implements UnitOfWork, Service {
     }
 
     public RouteContext popRouteContext() {
-        try {
-            return routeContextStack.pop();
-        } catch (NoSuchElementException e) {
-            // ignore and return null
-        }
-        return null;
+        return routeContextStack.pollFirst();
     }
 
     public AsyncCallback beforeProcess(Processor processor, Exchange exchange, AsyncCallback callback) {