Skip to content

Commit 7ab1ebb

Browse files
committed
[test] Use mockito anyString instead of deprecated anyObject
1 parent d83b892 commit 7ab1ebb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/org/apache/ibatis/scripting/defaults/DefaultParameterHandlerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
import static org.mockito.ArgumentMatchers.any;
3636
import static org.mockito.ArgumentMatchers.anyInt;
37-
import static org.mockito.ArgumentMatchers.anyObject;
37+
import static org.mockito.ArgumentMatchers.anyString;
3838
import static org.mockito.Mockito.doThrow;
3939
import static org.mockito.Mockito.mock;
4040
import static org.mockito.Mockito.when;
@@ -53,7 +53,7 @@ public void setParametersThrowsProperException() throws SQLException {
5353
final BoundSql boundSql = mock(BoundSql.class);
5454

5555
TypeHandler<String> typeHandler = mock(TypeHandler.class);
56-
doThrow(new SQLException("foo")).when(typeHandler).setParameter(any(PreparedStatement.class), anyInt(), (String) anyObject(), any(JdbcType.class));
56+
doThrow(new SQLException("foo")).when(typeHandler).setParameter(any(PreparedStatement.class), anyInt(), anyString(), any(JdbcType.class));
5757
ParameterMapping parameterMapping = new ParameterMapping.Builder(mappedStatement.getConfiguration(), "prop", typeHandler).build();
5858
List<ParameterMapping> parameterMappings = Collections.singletonList(parameterMapping);
5959
when(boundSql.getParameterMappings()).thenReturn(parameterMappings);

0 commit comments

Comments
 (0)