Improve behavior of close in JDK versions where AutoCloseable is not available. In JDK 1.5 and 1.6, call ResultSet.close() or Closeable.close() if the underlying object is either of those types. In JDK 1.7 onwards, they are all AutoCloseable.