comparison src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @ 164:7c9e386fe49a

As of Java 1.7 implementations of JDBC interfaces Connection, Statement, PreparedStatement, CallableStatement and ResulSet must implement the AutoCloseable interface with method close(). This method is invoked automatically on objects managed by the try-with-resources statement. See http://docs.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html http://docs.oracle.com/javase/7/docs/api/java/sql/PreparedStatement.html http://docs.oracle.com/javase/7/docs/api/java/sql/CallableStatement.html http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 07 Sep 2017 17:15:41 +0200 (2017-09-07)
parents d6abd1ffffbb
children 89e954e7acbb
comparison
equal deleted inserted replaced
163:e398c27acf7e 164:7c9e386fe49a
70 * 70 *
71 * @author Fabian Groffen 71 * @author Fabian Groffen
72 * @author Martin van Dinther 72 * @author Martin van Dinther
73 * @version 1.3 73 * @version 1.3
74 */ 74 */
75 public class MonetConnection extends MonetWrapper implements Connection { 75 public class MonetConnection
76 extends MonetWrapper
77 implements Connection, AutoCloseable
78 {
76 /** the successful processed input properties */ 79 /** the successful processed input properties */
77 private final Properties conn_props = new Properties(); 80 private final Properties conn_props = new Properties();
78 81
79 /** The hostname to connect to */ 82 /** The hostname to connect to */
80 private final String hostname; 83 private final String hostname;