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
commit bee58f8e5ba7324818ae19a43f7a0f0a90845ec5
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Thu Dec 7 10:40:57 2017 +0100
CAMEL-12065 - [Camel-consul] firstIndex cannot be set if it is out of Long range
---
.../apache/camel/component/consul/ConsulClientConfiguration.java | 7 ++++---
.../camel/component/consul/enpoint/AbstractConsulConsumer.java | 2 +-
.../component/consul/springboot/ConsulComponentConfiguration.java | 7 ++++---
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
index fc92fc6..ab893da 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.component.consul;
+import java.math.BigInteger;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@@ -66,7 +67,7 @@ public class ConsulClientConfiguration implements Cloneable {
@UriParam(label = "consumer,watch", defaultValue = "10")
private Integer blockSeconds = 10;
@UriParam(label = "consumer,watch", defaultValue = "0")
- private long firstIndex;
+ private BigInteger firstIndex;
@UriParam(label = "consumer,watch", defaultValue = "false")
private boolean recursive;
@@ -269,14 +270,14 @@ public class ConsulClientConfiguration implements Cloneable {
this.blockSeconds = blockSeconds;
}
- public long getFirstIndex() {
+ public BigInteger getFirstIndex() {
return firstIndex;
}
/**
* The first index for watch for, default 0
*/
- public void setFirstIndex(long firstIndex) {
+ public void setFirstIndex(BigInteger firstIndex) {
this.firstIndex = firstIndex;
}
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/enpoint/AbstractConsulConsumer.java
b/components/camel-consul/src/main/java/org/apache/camel/component/consul/enpoint/AbstractConsulConsumer.java
index 12f4ec6..4cf69bc 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/enpoint/AbstractConsulConsumer.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/enpoint/AbstractConsulConsumer.java
@@ -43,7 +43,7 @@ abstract class AbstractConsulConsumer<C> extends DefaultConsumer {
this.endpoint = endpoint;
this.configuration = configuration;
this.key = ObjectHelper.notNull(configuration.getKey(), ConsulConstants.CONSUL_KEY);
- this.index = new AtomicReference<>(BigInteger.valueOf(configuration.getFirstIndex()));
+ this.index = new AtomicReference<>(configuration.getFirstIndex());
this.clientSupplier = clientSupplier;
this.watcher = null;
}
diff --git a/platforms/spring-boot/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/ConsulComponentConfiguration.java
b/platforms/spring-boot/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/ConsulComponentConfiguration.java
index 6e49b2e..3c5cbad 100644
--- a/platforms/spring-boot/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/ConsulComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/ConsulComponentConfiguration.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.component.consul.springboot;
+import java.math.BigInteger;
import java.util.List;
import java.util.Set;
import javax.annotation.Generated;
@@ -243,7 +244,7 @@ public class ConsulComponentConfiguration
/**
* The first index for watch for, default 0
*/
- private Long firstIndex;
+ private BigInteger firstIndex;
/**
* Recursively watch, default false
*/
@@ -405,11 +406,11 @@ public class ConsulComponentConfiguration
this.blockSeconds = blockSeconds;
}
- public Long getFirstIndex() {
+ public BigInteger getFirstIndex() {
return firstIndex;
}
- public void setFirstIndex(Long firstIndex) {
+ public void setFirstIndex(BigInteger firstIndex) {
this.firstIndex = firstIndex;
}
--
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <commits@camel.apache.org>.
|