Here you can find the source of closeResultSet(final ResultSet resultSet)
Parameter | Description |
---|---|
resultSet | the JDBC ResultSet to close |
public static void closeResultSet(final ResultSet resultSet)
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; import java.sql.SQLException; public class Main { /**/*from www . j a v a2s .com*/ * Close the given JDBC ResultSet and ignore any thrown exception. This is useful for typical finally blocks in * manual JDBC code. * * @param resultSet * the JDBC ResultSet to close */ public static void closeResultSet(final ResultSet resultSet) { if (resultSet != null) { try { resultSet.close(); } catch (final SQLException ex) { } } } }