Skip to content

Commit

Permalink
(#29) Simplified getObject
Browse files Browse the repository at this point in the history
  • Loading branch information
svettwer committed Feb 8, 2019
1 parent 43317c5 commit b07231f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public Timestamp getTimestamp(final int parameterIndex) throws SQLException {

@Override
public Object getObject(final int parameterIndex) throws SQLException {
return getDataRow().getValue(parameterIndex-1, Object.class);
return getDataRow().getValue(parameterIndex-1);
}

@Override
Expand Down Expand Up @@ -398,7 +398,7 @@ public Timestamp getTimestamp(final String parameterName) throws SQLException {

@Override
public Object getObject(final String parameterName) throws SQLException {
return getDataRow().getValue(parameterName, Object.class);
return getDataRow().getValue(parameterName);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,6 @@ void testGetObjectByName() throws SQLException {

//THEN
assertEquals(object, expectedObject);
verify(rowSpy).getValue(TEST_VALUE_NAME, Object.class);
}

@Test
Expand Down Expand Up @@ -844,7 +843,7 @@ void testGetTimestampByIndex() throws SQLException {
}

@Test
void testGetObjectStampByIndex() throws SQLException {
void testGetObjectByIndex() throws SQLException {

//GIVEN
final Object expectedObject = new Timestamp(619912812345L);
Expand All @@ -855,7 +854,6 @@ void testGetObjectStampByIndex() throws SQLException {

//THEN
assertEquals(anObject, expectedObject);
verify(rowSpy).getValue(TEST_VALUE_INDEX_INTERNAL, Object.class);
}

@Test
Expand Down

0 comments on commit b07231f

Please sign in to comment.