Skip to content

Commit 2d6aed5

Browse files
committed
fixes #492 Avoid NPE when CallableStatement#getObject(int parameterIndex) returned null.
1 parent acf6b36 commit 2d6aed5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ public void handleOutputParameters(CallableStatement cs) throws SQLException {
146146
}
147147

148148
private void handleRefCursorOutputParameter(ResultSet rs, ParameterMapping parameterMapping, MetaObject metaParam) throws SQLException {
149+
if (rs == null) {
150+
return;
151+
}
149152
try {
150153
final String resultMapId = parameterMapping.getResultMapId();
151154
final ResultMap resultMap = configuration.getResultMap(resultMapId);

0 commit comments

Comments
 (0)