This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new 0e8b0fa cxf-rt-rs-extension-search: remove useless null check
0e8b0fa is described below
commit 0e8b0fac8fe12e56c30980cf08590b549af0c0d9
Author: Alexey Markevich <[email protected]>
AuthorDate: Tue Nov 19 15:53:39 2019 +0300
cxf-rt-rs-extension-search: remove useless null check
---
.../jaxrs/ext/search/lucene/LuceneQueryVisitor.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
index 0d0b1aa..9c7cfd8 100644
---
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
+++
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
@@ -266,14 +266,14 @@ public class LuceneQueryVisitor<T> extends
AbstractSearchConditionVisitor<T, Que
Integer min = getMin(type, intValue);
if (min == null) {
min = Integer.MIN_VALUE;
- } else if (min != null && !minInclusive) {
+ } else if (!minInclusive) {
min = Math.addExact(min, 1);
}
Integer max = getMax(type, intValue);
if (max == null) {
max = Integer.MAX_VALUE;
- } else if (max != null && !maxInclusive) {
+ } else if (!maxInclusive) {
max = Math.addExact(max, -1);
}
@@ -286,15 +286,15 @@ public class LuceneQueryVisitor<T> extends
AbstractSearchConditionVisitor<T, Que
Long min = getMin(type, longValue);
if (min == null) {
min = Long.MIN_VALUE;
- } else if (min != null && !minInclusive) {
- min = Math.addExact(min, 1);
+ } else if (!minInclusive) {
+ min = Math.addExact(min, 1L);
}
Long max = getMax(type, longValue);
if (max == null) {
max = Long.MAX_VALUE;
- } else if (max != null && !maxInclusive) {
- max = Math.addExact(max, -1);
+ } else if (!maxInclusive) {
+ max = Math.addExact(max, -1L);
}
return LongPoint.newRangeQuery(name, min, max);
}
@@ -305,14 +305,14 @@ public class LuceneQueryVisitor<T> extends
AbstractSearchConditionVisitor<T, Que
Double min = getMin(type, doubleValue);
if (min == null) {
min = Double.NEGATIVE_INFINITY;
- } else if (min != null && !minInclusive) {
+ } else if (!minInclusive) {
min = Math.nextUp(min);
}
Double max = getMax(type, doubleValue);
if (max == null) {
max = Double.POSITIVE_INFINITY;
- } else if (max != null && !maxInclusive) {
+ } else if (!maxInclusive) {
max = Math.nextDown(max);
}
return DoublePoint.newRangeQuery(name, min, max);
@@ -324,14 +324,14 @@ public class LuceneQueryVisitor<T> extends
AbstractSearchConditionVisitor<T, Que
Float min = getMin(type, floatValue);
if (min == null) {
min = Float.NEGATIVE_INFINITY;
- } else if (min != null && !minInclusive) {
+ } else if (!minInclusive) {
min = Math.nextUp(min);
}
Float max = getMax(type, floatValue);
if (max == null) {
max = Float.POSITIVE_INFINITY;
- } else if (max != null && !maxInclusive) {
+ } else if (!maxInclusive) {
max = Math.nextDown(max);
}