[jOOQ/jOOQ#17074] Add type witness to work around broken inference

This commit is contained in:
Lukas Eder 2024-08-15 13:16:41 +02:00
parent cb982b37d8
commit 428fbc5a56
2 changed files with 2 additions and 2 deletions

View File

@ -247,7 +247,7 @@ implements
ctx.visit(JSONObject.absentOnNullIf(
() -> onNull == JSONOnNull.ABSENT_ON_NULL,
e -> e,
array(map(fields, e -> JSONEntryImpl.jsonCast(ctx, e).cast(JSON)))
DSL.<JSON>array(map(fields, e -> JSONEntryImpl.jsonCast(ctx, e).cast(JSON)))
).cast(JSON));
}

View File

@ -296,7 +296,7 @@ implements
absentOnNullIf(
() -> onNull == JSONOnNull.ABSENT_ON_NULL,
e -> DSL.field("{0}[2]", e.getDataType(), e),
array(map(entries, e -> function(N_ROW, JSON, e.key(), JSONEntryImpl.jsonCast(ctx, e.value()).cast(JSON))))
DSL.<JSON>array(map(entries, e -> function(N_ROW, JSON, e.key(), JSONEntryImpl.jsonCast(ctx, e.value()).cast(JSON))))
)
).cast(JSON));
}