Skip to content

Commit a3942c5

Browse files
author
Thomas Risberg
committed
changed exception class thrown for problems configuring GenericSqlQuery class (SPR-3986)
1 parent 49549d6 commit a3942c5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

org.springframework.jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616

1717
package org.springframework.jdbc.object;
1818

19-
import java.sql.ResultSet;
20-
import java.sql.SQLException;
2119
import java.util.Map;
2220

2321
import org.springframework.jdbc.core.RowMapper;
2422
import org.springframework.util.Assert;
25-
import org.springframework.dao.InvalidDataAccessApiUsageException;
23+
import org.springframework.dao.InvalidDataAccessResourceUsageException;
2624

2725
public class GenericSqlQuery extends SqlQuery {
2826

@@ -49,10 +47,10 @@ protected RowMapper newRowMapper(Object[] parameters, Map context) {
4947
return (RowMapper) rowMapperClass.newInstance();
5048
}
5149
catch (InstantiationException e) {
52-
throw new InvalidDataAccessApiUsageException("Unable to instantiate RowMapper", e);
50+
throw new InvalidDataAccessResourceUsageException("Unable to instantiate RowMapper", e);
5351
}
5452
catch (IllegalAccessException e) {
55-
throw new InvalidDataAccessApiUsageException("Unable to instantiate RowMapper", e);
53+
throw new InvalidDataAccessResourceUsageException("Unable to instantiate RowMapper", e);
5654
}
5755
}
5856
}

0 commit comments

Comments
 (0)