camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-10454) Unclear piece in IdempotentConsumer.java
Date Wed, 16 Nov 2016 01:27:59 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jiang resolved CAMEL-10454.
----------------------------------
    Resolution: Fixed

> Unclear piece in IdempotentConsumer.java
> ----------------------------------------
>
>                 Key: CAMEL-10454
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10454
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Boris Treukhov
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 2.17.4, 2.18.1, 2.19.0
>
>
> Current implementation of IdempotentConsumer.java has very strange check on whether IdempotentRepository
contains the key - if it's ExchangeIdempotentRepository then the result of "contains()" check
is not inverted(i.e. there is no NOT operator), while for other types of IdempotentRepository
it IS inverted with "!".
>  // check if we already have the key
>                 if (idempotentRepository instanceof ExchangeIdempotentRepository) {
>                     newKey = ((ExchangeIdempotentRepository<String>) idempotentRepository).contains(exchange,
messageId);
>                 } else {
>                     newKey = !idempotentRepository.contains(messageId);
>                 }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message