View | Details | Raw Unified | Return to bug 17388
Collapse All | Expand All

(-)QueryTagSupport.java.orig (-1 / +8 lines)
Lines 210-224 Link Here
210
	 * if it was from the ResultSet.
210
	 * if it was from the ResultSet.
211
          */
211
          */
212
	PreparedStatement ps = null;
212
	PreparedStatement ps = null;
213
	ResultSet rs = null;
213
	try {
214
	try {
214
	    ps = conn.prepareStatement(sqlStatement);
215
	    ps = conn.prepareStatement(sqlStatement);
215
	    setParameters(ps, parameters);
216
	    setParameters(ps, parameters);
216
	    ResultSet rs = ps.executeQuery();
217
	    rs = ps.executeQuery();
217
	    result = new ResultImpl(rs, startRow, maxRows);
218
	    result = new ResultImpl(rs, startRow, maxRows);
218
	}
219
	}
219
	catch (Throwable e) {
220
	catch (Throwable e) {
220
	    throw new JspException(sqlStatement + ": " + e.getMessage(), e);
221
	    throw new JspException(sqlStatement + ": " + e.getMessage(), e);
221
	} finally {
222
	} finally {
223
		if (rs != null) {
224
				try {
225
						rs.close();
226
				} catch (SQLException sqe) {
227
						throw new JspException(sqe.getMessage(), sqe);
228
				}
222
	    if (ps != null) {
229
	    if (ps != null) {
223
		try {
230
		try {
224
		    ps.close();
231
		    ps.close();

Return to bug 17388