Repository: camel Updated Branches: refs/heads/master cccf6726b -> 27cf87dc7
CAMEL-10997: Fixed test due ObjectHelper.isNotEmpty was changed. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/27cf87dc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/27cf87dc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/27cf87dc Branch: refs/heads/master Commit: 27cf87dc71c3aad78a027523bd84bcbc840f4498 Parents: cccf672 Author: Claus Ibsen <davscl...@apache.org> Authored: Mon Mar 13 10:42:32 2017 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Mon Mar 13 10:43:13 2017 +0100 ---------------------------------------------------------------------- .../hazelcast/queue/HazelcastQueueProducer.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/27cf87dc/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java index 671eb60..450c144 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueProducer.java @@ -46,10 +46,10 @@ public class HazelcastQueueProducer extends HazelcastDefaultProducer { Map<String, Object> headers = exchange.getIn().getHeaders(); // get header parameters - Object draintToCollection = null; + Object drainToCollection = null; if (headers.containsKey(HazelcastConstants.DRAIN_TO_COLLECTION)) { - draintToCollection = headers.get(HazelcastConstants.DRAIN_TO_COLLECTION); + drainToCollection = headers.get(HazelcastConstants.DRAIN_TO_COLLECTION); } final int operation = lookupOperationNumber(exchange); @@ -87,13 +87,8 @@ public class HazelcastQueueProducer extends HazelcastDefaultProducer { break; case HazelcastConstants.DRAIN_TO_OPERATION: - if (ObjectHelper.isNotEmpty(draintToCollection)) { - this.drainTo((Collection) draintToCollection, exchange); - } else { - throw new IllegalArgumentException("Drain to collection header must be specified"); - } + this.drainTo((Collection) drainToCollection, exchange); break; - default: throw new IllegalArgumentException(String.format("The value '%s' is not allowed for parameter '%s' on the QUEUE cache.", operation, HazelcastConstants.OPERATION)); }