Skip to content

Commit

Permalink
Merge pull request querydsl#2563 from jwgmeligmeyling/comparable-expr…
Browse files Browse the repository at this point in the history
…ession-inconsistency

Fix inconsistency between final and non-final methods in ComparableExpression, ComparableExpressionBase and SimpleExpression
  • Loading branch information
jwgmeligmeyling committed Jan 1, 2021
2 parents 32e927d + 261612a commit 78cd6ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ComparableExpression<T> as(String alias) {
* @param to inclusive end of range
* @return this between from and to
*/
public final BooleanExpression between(@Nullable T from, @Nullable T to) {
public BooleanExpression between(@Nullable T from, @Nullable T to) {
if (from == null) {
if (to != null) {
return Expressions.booleanOperation(Ops.LOE, mixin, ConstantImpl.create(to));
Expand All @@ -74,7 +74,7 @@ public final BooleanExpression between(@Nullable T from, @Nullable T to) {
* @param to inclusive end of range
* @return this between from and to
*/
public final BooleanExpression between(@Nullable Expression<T> from, @Nullable Expression<T> to) {
public BooleanExpression between(@Nullable Expression<T> from, @Nullable Expression<T> to) {
if (from == null) {
if (to != null) {
return Expressions.booleanOperation(Ops.LOE, mixin, to);
Expand All @@ -98,7 +98,7 @@ public final BooleanExpression between(@Nullable Expression<T> from, @Nullable E
* @param to inclusive end of range
* @return this not between from and to
*/
public final BooleanExpression notBetween(T from, T to) {
public BooleanExpression notBetween(T from, T to) {
return between(from, to).not();
}

Expand All @@ -111,7 +111,7 @@ public final BooleanExpression notBetween(T from, T to) {
* @param to inclusive end of range
* @return this not between from and to
*/
public final BooleanExpression notBetween(Expression<T> from, Expression<T> to) {
public BooleanExpression notBetween(Expression<T> from, Expression<T> to) {
return between(from, to).not();
}

Expand Down Expand Up @@ -246,7 +246,7 @@ public BooleanExpression goeAny(SubQueryExpression<? extends T> right) {
* @return this &lt; right
* @see java.lang.Comparable#compareTo(Object)
*/
public final BooleanExpression lt(T right) {
public BooleanExpression lt(T right) {
return lt(ConstantImpl.create(right));
}

Expand All @@ -257,7 +257,7 @@ public final BooleanExpression lt(T right) {
* @return this &lt; right
* @see java.lang.Comparable#compareTo(Object)
*/
public final BooleanExpression lt(Expression<T> right) {
public BooleanExpression lt(Expression<T> right) {
return Expressions.booleanOperation(Ops.LT, mixin, right);
}

Expand Down Expand Up @@ -308,7 +308,7 @@ public BooleanExpression ltAny(SubQueryExpression<? extends T> right) {
* @return this &lt;= right
* @see java.lang.Comparable#compareTo(Object)
*/
public final BooleanExpression loe(T right) {
public BooleanExpression loe(T right) {
return Expressions.booleanOperation(Ops.LOE, mixin, ConstantImpl.create(right));
}

Expand All @@ -319,7 +319,7 @@ public final BooleanExpression loe(T right) {
* @return this &lt;= right
* @see java.lang.Comparable#compareTo(Object)
*/
public final BooleanExpression loe(Expression<T> right) {
public BooleanExpression loe(Expression<T> right) {
return Expressions.booleanOperation(Ops.LOE, mixin, right);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public ComparableExpressionBase(Expression<T> mixin) {
*
* @return ascending order by this
*/
public final OrderSpecifier<T> asc() {
public OrderSpecifier<T> asc() {
if (asc == null) {
asc = new OrderSpecifier<T>(Order.ASC, mixin);
}
Expand All @@ -57,7 +57,7 @@ public final OrderSpecifier<T> asc() {
* @return coalesce
*/
@SuppressWarnings("unchecked")
public final Coalesce<T> coalesce(Expression<?>...exprs) {
public Coalesce<T> coalesce(Expression<?>...exprs) {
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand All @@ -71,7 +71,7 @@ public final Coalesce<T> coalesce(Expression<?>...exprs) {
* @param args additional arguments
* @return coalesce
*/
public final Coalesce<T> coalesce(T... args) {
public Coalesce<T> coalesce(T... args) {
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
for (T arg : args) {
coalesce.add(arg);
Expand All @@ -84,7 +84,7 @@ public final Coalesce<T> coalesce(T... args) {
*
* @return descending order by this
*/
public final OrderSpecifier<T> desc() {
public OrderSpecifier<T> desc() {
if (desc == null) {
desc = new OrderSpecifier<T>(Order.DESC, mixin);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public BooleanExpression notIn(T... right) {
* @param right rhs of the comparison
* @return this not in right
*/
public final BooleanExpression notIn(CollectionExpression<?,? extends T> right) {
public BooleanExpression notIn(CollectionExpression<?,? extends T> right) {
return Expressions.booleanOperation(Ops.NOT_IN, mixin, right);
}

Expand All @@ -328,7 +328,7 @@ public final BooleanExpression notIn(CollectionExpression<?,? extends T> right)
* @param right rhs of the comparison
* @return this not in right
*/
public final BooleanExpression notIn(SubQueryExpression<? extends T> right) {
public BooleanExpression notIn(SubQueryExpression<? extends T> right) {
return Expressions.booleanOperation(Ops.NOT_IN, mixin, right);
}

Expand All @@ -338,7 +338,7 @@ public final BooleanExpression notIn(SubQueryExpression<? extends T> right) {
* @param right rhs of the comparison
* @return this not in right
*/
public final BooleanExpression notIn(Expression<? extends T>... right) {
public BooleanExpression notIn(Expression<? extends T>... right) {
return Expressions.booleanOperation(Ops.NOT_IN, mixin, Expressions.list(right));
}

Expand Down

0 comments on commit 78cd6ae

Please sign in to comment.