Skip to content

Commit

Permalink
Fix coalesce - requires exact type issue #683 (#684)
Browse files Browse the repository at this point in the history
* Fix coalesce - requires exact type issue #683

* Fix coalesce - requires exact type issue #683

---------

Co-authored-by: kkrzywanski <[email protected]>
  • Loading branch information
kamilkrzywanski and kkrzywanski authored Nov 25, 2024
1 parent 9d0de8c commit 7f97f77
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public BooleanExpression coalesce(Expression<Boolean> expr) {
*/
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public BooleanExpression coalesce(Expression<?>... exprs) {
public BooleanExpression coalesce(Expression<Boolean>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ public ComparableExpression<T> coalesce(Expression<T> expr) {
*/
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public ComparableExpression<T> coalesce(Expression<?>... exprs) {
public ComparableExpression<T> coalesce(Expression<T>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public ComparableExpressionBase<T> coalesce(Expression<T> expr) {
* @return coalesce
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public ComparableExpressionBase<T> coalesce(Expression<?>... exprs) {
public ComparableExpressionBase<T> coalesce(Expression<T>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public DateExpression<T> coalesce(Expression<T> expr) {
*/
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public DateExpression<T> coalesce(Expression<?>... exprs) {
public DateExpression<T> coalesce(Expression<T>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public DateTimeExpression<T> coalesce(Expression<T> expr) {
*/
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public DateTimeExpression<T> coalesce(Expression<?>... exprs) {
public DateTimeExpression<T> coalesce(Expression<T>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public EnumExpression<T> coalesce(Expression<T> expr) {
*/
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public EnumExpression<T> coalesce(Expression<?>... exprs) {
public EnumExpression<T> coalesce(Expression<T>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ public NumberExpression<T> coalesce(Expression<T> expr) {
*/
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public NumberExpression<T> coalesce(Expression<?>... exprs) {
public NumberExpression<T> coalesce(Expression<T>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ public StringExpression coalesce(Expression<String> expr) {
*/
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public StringExpression coalesce(Expression<?>... exprs) {
public StringExpression coalesce(Expression<String>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public TimeExpression<T> coalesce(Expression<T> expr) {
*/
@Override
@SuppressWarnings({"unchecked", "rawtypes"})
public TimeExpression<T> coalesce(Expression<?>... exprs) {
public TimeExpression<T> coalesce(Expression<T>... exprs) {
var coalesce = new Coalesce<>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void test() {
// Field<T> coalesce(Field<T> option, Field<?>... options)
str.coalesce(str);
// Field<T> coalesce(T option, T... options)

str.coalesce(str, str);
// Field<String> concat(Field<?>... fields)
str.concat(str);
// Field<String> concat(String... values)
Expand Down

0 comments on commit 7f97f77

Please sign in to comment.