Skip to content

Commit 63167dc

Browse files
committed
primitive types, array types and java. and javax. types are all passed through to getObject()
1 parent c5fab03 commit 63167dc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mug-guava/src/main/java/com/google/mu/safesql/ResultMapper.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@
4242
*/
4343
abstract class ResultMapper<T> {
4444
static <T> ResultMapper<T> toResultOf(Class<T> resultType) {
45-
if (Primitives.allPrimitiveTypes().contains(resultType) || resultType.isArray()
46-
|| resultType.getName().startsWith("java.")
47-
|| resultType.getName().startsWith("javax.")) {
45+
if (resultType.getName().startsWith("java.")
46+
|| resultType.getName().startsWith("javax.")
47+
|| Primitives.allPrimitiveTypes().contains(resultType)
48+
|| resultType.isArray()) {
4849
return new ResultMapper<T>() {
4950
@Override T from(ResultSet row) throws SQLException {
5051
return row.getObject(1, resultType);

0 commit comments

Comments
 (0)