public static void closeResultSet(ResultSet rs) {
        if (rs != null) {
            try {
                    rs.close();
                }
            catch (SQLException e) {
                Log.error(e.getMessage(), e);
            }
        }
    }
Closes a result set. This method should be called within the finally section of
your database logic, as in the following example:

<pre>
 public void doSomething(Connection con) {
     ResultSet rs = null;
     PreparedStatement pstmt = null;
     try {
         pstmt = con.prepareStatement("select * from blah");
         rs = pstmt.executeQuery();
         ....
     }
     catch (SQLException sqle) {
         Log.error(sqle.getMessage(), sqle);
     }
     finally {
         ConnectionManager.closeResultSet(rs);
         ConnectionManager.closePreparedStatement(pstmt);
     }
} </pre>

@param rs the result set to close.
xmppserver/src/main/java/org/jivesoftware/database/DbConnectionManager.java