From e41d0d281cd06bccf111004603c5d366bed3a773 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Tue, 24 May 2022 15:22:45 +0200 Subject: [PATCH] Document cast that is a workaround for an Eclipse compiler issue Issue here: https://github.com/eclipse-jdt/eclipse.jdt.core/issues/99 --- jOOQ/src/main/java/org/jooq/impl/ParserImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java index 40539fb46c..b323445b5a 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java @@ -2309,6 +2309,7 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { if (parseKeywordIf("DUPLICATE KEY UPDATE")) { parseKeywordIf("SET"); + // Cast is necessary, see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/99 InsertOnConflictWhereStep where = parseKeywordIf("ALL TO EXCLUDED") ? onDuplicate.onDuplicateKeyUpdate().setAllToExcluded() : onDuplicate.onDuplicateKeyUpdate().set((Map) data(DATA_PARSE_ON_CONFLICT, true, c -> c.parseSetClauseList())); @@ -2344,6 +2345,8 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { returning = doUpdate.doNothing(); } else if (parseKeywordIf("UPDATE SET")) { + + // Cast is necessary, see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/99 InsertOnConflictWhereStep where = parseKeywordIf("ALL TO EXCLUDED") ? doUpdate.doUpdate().setAllToExcluded() : doUpdate.doUpdate().set((Map) data(DATA_PARSE_ON_CONFLICT, true, c -> c.parseSetClauseList()));