diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/RecordTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/RecordTests.java index c59338d4fc..3784d6668e 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/RecordTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/RecordTests.java @@ -55,6 +55,7 @@ import org.jooq.TableRecord; import org.jooq.UpdatableRecord; import org.jooq.test.BaseTest; import org.jooq.test.jOOQAbstractTest; +import org.jooq.tools.reflect.Reflect; import org.junit.Test; @@ -153,6 +154,33 @@ extends BaseTest void setValue(Field field, T value) { - Value val = getValue0(field); + setValue(fields.indexOf(field), field, value); + } + + private final void setValue(int index, Field field, T value) { + Value val = getValue0(index); UniqueKey key = getPrimaryKey(); // Normal fields' changed flag is always set to true @@ -337,14 +349,6 @@ abstract class AbstractRecord extends AbstractStore implements Record { getValues()[index] = value; } - /** - * Subclasses may type-unsafely set a value to a record index. This method - * takes care of converting the value to the appropriate type. - */ - protected final void setValue(int index, Object value) { - getValue0(index).setValue(Convert.convert(value, fields.type(index))); - } - /** * Subclasses may override this */