Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,9 @@ private ElementImpl resultAsElement(final boolean makeNodeFromColumnName, final
//get the content
if (rsmd.getColumnType(i + 1) == Types.SQLXML) {
//parse sqlxml value
@Nullable SQLXML sqlXml = null;
try {
final SQLXML sqlXml = rs.getSQLXML(i + 1);
sqlXml = rs.getSQLXML(i + 1);

if (rs.wasNull()) {
// Add a null indicator attribute if the value was SQL Null
Expand All @@ -455,7 +456,12 @@ private ElementImpl resultAsElement(final boolean makeNodeFromColumnName, final
}
} catch (final Exception e) {
throw new XPathException(this, "Could not parse column of type SQLXML: " + e.getMessage(), e);
} finally {
if (sqlXml != null) {
sqlXml.free();
}
}

} else {
//otherwise assume string value
final String colValue = rs.getString(i + 1);
Expand Down
Loading