You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (JIRA)" <ji...@apache.org> on 2019/01/17 11:12:00 UTC
[jira] [Assigned] (CAMEL-13072) In
DefaultUnitOfWork:popRouteContext() avoid exception thrown
[ https://issues.apache.org/jira/browse/CAMEL-13072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Cosentino reassigned CAMEL-13072:
----------------------------------------
Assignee: Andrea Cosentino
> In DefaultUnitOfWork:popRouteContext() avoid exception thrown
> --------------------------------------------------------------
>
> Key: CAMEL-13072
> URL: https://issues.apache.org/jira/browse/CAMEL-13072
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.21.4
> Reporter: Martin Lichtin
> Assignee: Andrea Cosentino
> Priority: Minor
> Fix For: 2.21.5, 2.22.3, 3.0.0, 2.23.2, 2.24.0
>
>
> Instead of
> {noformat}
> public RouteContext popRouteContext() {
> try {
> return routeContextStack.pop();
> } catch (NoSuchElementException e) {
> // ignore and return null
> }
> return null;
> }
> {noformat}
> can just write
> {noformat}
> public RouteContext popRouteContext() {
> return routeContextStack.pollFirst();
> }
> {noformat}
> I understand the cost of an exception is low, but still it doesn't look nice to see zillions of exceptions in a flight recording caused by Camel.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)