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

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

commit 0ecc08fbf3822559268be37b490fb84424fb5a75
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Wed Jan 4 17:56:43 2023 +0100

    (chores) camel-consul: avoid risky unboxing
---
 .../camel/component/consul/endpoint/ConsulKeyValueProducer.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-consul/src/main/java/org/apache/camel/component/consul/endpoint/ConsulKeyValueProducer.java
 
b/components/camel-consul/src/main/java/org/apache/camel/component/consul/endpoint/ConsulKeyValueProducer.java
index f88b9572c73..74a611386f0 100644
--- 
a/components/camel-consul/src/main/java/org/apache/camel/component/consul/endpoint/ConsulKeyValueProducer.java
+++ 
b/components/camel-consul/src/main/java/org/apache/camel/component/consul/endpoint/ConsulKeyValueProducer.java
@@ -46,7 +46,7 @@ public final class ConsulKeyValueProducer extends 
AbstractConsulProducer<KeyValu
     protected void getValue(Message message) throws Exception {
         Object result;
 
-        Boolean asString = 
message.getHeader(ConsulConstants.CONSUL_VALUE_AS_STRING, 
getConfiguration().isValueAsString(),
+        boolean asString = 
message.getHeader(ConsulConstants.CONSUL_VALUE_AS_STRING, 
getConfiguration().isValueAsString(),
                 Boolean.class);
         if (asString) {
             result = getClient()
@@ -68,7 +68,7 @@ public final class ConsulKeyValueProducer extends 
AbstractConsulProducer<KeyValu
     protected void getValues(Message message) throws Exception {
         Object result;
 
-        Boolean asString = 
message.getHeader(ConsulConstants.CONSUL_VALUE_AS_STRING, 
getConfiguration().isValueAsString(),
+        boolean asString = 
message.getHeader(ConsulConstants.CONSUL_VALUE_AS_STRING, 
getConfiguration().isValueAsString(),
                 Boolean.class);
         if (asString) {
             result = getClient().getValuesAsString(

Reply via email to