diff --git a/jOOQ/src/main/java/org/jooq/impl/UpdatableRecordImpl.java b/jOOQ/src/main/java/org/jooq/impl/UpdatableRecordImpl.java index 78526da021..9ad96cda81 100644 --- a/jOOQ/src/main/java/org/jooq/impl/UpdatableRecordImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/UpdatableRecordImpl.java @@ -423,15 +423,15 @@ public class UpdatableRecordImpl> extends TableReco refresh(refreshFields.toArray(EMPTY_FIELD)); } - // Cast is needed in Java 8 it seems - @SuppressWarnings({ "unchecked", "rawtypes", "cast" }) + @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public final R copy() { // [#3359] The "fetched" flag must be set to false to enforce INSERT statements on // subsequent store() calls - when Settings.updatablePrimaryKeys is set. - return Tools.newRecord(false, getTable(), configuration()) - .operate(copy -> { + // R vs Record casting is needed in Java 8 it seems + return (R) Tools.newRecord(false, (Table) (Table) getTable(), configuration()) + .operate((Record copy) -> { // Copy all fields. This marks them all as isChanged, which is important List> key = getPrimaryKey().getFields();