diff --git a/jOOQ/src/main/java/org/jooq/Cursor.java b/jOOQ/src/main/java/org/jooq/Cursor.java index 37822a722f..b734e23dc1 100644 --- a/jOOQ/src/main/java/org/jooq/Cursor.java +++ b/jOOQ/src/main/java/org/jooq/Cursor.java @@ -67,7 +67,7 @@ import org.jooq.impl.DefaultRecordMapper; * @param The cursor's record type * @author Lukas Eder */ -public interface Cursor extends Iterable { +public interface Cursor extends Iterable /* [java-8] */, AutoCloseable /* [java-8] */ { /** * Get this cursor's row type. @@ -372,6 +372,9 @@ public interface Cursor extends Iterable { * * @throws DataAccessException if something went wrong executing the query */ + /* [java-8] */ + @Override + /* [/java-8] */ void close() throws DataAccessException; /** diff --git a/jOOQ/src/main/java/org/jooq/Query.java b/jOOQ/src/main/java/org/jooq/Query.java index 8d94ea1f13..703c0a89ca 100644 --- a/jOOQ/src/main/java/org/jooq/Query.java +++ b/jOOQ/src/main/java/org/jooq/Query.java @@ -58,7 +58,7 @@ import org.jooq.impl.DSL; * * @author Lukas Eder */ -public interface Query extends QueryPart, Attachable { +public interface Query extends QueryPart, Attachable /* [java-8] */, AutoCloseable /* [java-8] */ { /** * Execute the query, if it has been created with a proper configuration. @@ -282,6 +282,9 @@ public interface Query extends QueryPart, Attachable { * @throws DataAccessException If something went wrong closing the statement * @see Statement#close() */ + /* [java-8] */ + @Override + /* [/java-8] */ void close() throws DataAccessException; /**