From 95d3b3aa0bf4a73e22dff43c14c1910bbb99f201 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Fri, 19 Apr 2013 10:44:21 +0200 Subject: [PATCH] Connection implements Closeable this allow for try-with-resources pattern in Java 7 while being backwards compatible --- src/main/java/org/yaz4j/Connection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/yaz4j/Connection.java b/src/main/java/org/yaz4j/Connection.java index 4accb99..ae99d7c 100644 --- a/src/main/java/org/yaz4j/Connection.java +++ b/src/main/java/org/yaz4j/Connection.java @@ -1,5 +1,6 @@ package org.yaz4j; +import java.io.Closeable; import org.yaz4j.exception.ZoomException; import org.yaz4j.jni.SWIGTYPE_p_ZOOM_connection_p; import org.yaz4j.jni.SWIGTYPE_p_ZOOM_query_p; @@ -35,7 +36,7 @@ import org.yaz4j.jni.yaz4jlib; * @see YAZ ZOOM Connection * @author jakub */ -public class Connection { +public class Connection implements Closeable { private String host; private int port; -- 1.7.10.4