Skip to content

Commit

Permalink
Tries to create an object matching the constructor, when the default …
Browse files Browse the repository at this point in the history
…approach fails
  • Loading branch information
jcsantosbr committed Mar 23, 2014
1 parent 0c10c72 commit 87b524c
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,13 @@ private Object createResultObject(ResultSetWrapper rsw, ResultMap resultMap, Lis
return createPrimitiveResultObject(rsw, resultMap, columnPrefix);
} else if (constructorMappings.size() > 0) {
return createParameterizedResultObject(rsw, resultType, constructorMappings, constructorArgTypes, constructorArgs, columnPrefix);
} else if (hasDefaultConstructor(resultType)) {
return objectFactory.create(resultType);
} else {
return createByConstructorSignature(rsw, resultType);
try {
return objectFactory.create(resultType);
} catch (Exception ex) {
return createByConstructorSignature(rsw, resultType);
}

}
}

Expand Down

0 comments on commit 87b524c

Please sign in to comment.