Created
June 13, 2012 08:45
-
-
Save matzew/2922867 to your computer and use it in GitHub Desktop.
Java7 Driver and Connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/datasource/DummyConnection.java b/deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/datasource/DummyConnection.java | |
index 064788c..d85777e 100644 | |
--- a/deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/datasource/DummyConnection.java | |
+++ b/deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/datasource/DummyConnection.java | |
@@ -35,6 +35,7 @@ import java.sql.Statement; | |
import java.sql.Struct; | |
import java.util.Map; | |
import java.util.Properties; | |
+import java.util.concurrent.Executor; | |
/** | |
* Dummy JDBC Connection for use in a unit test | |
@@ -334,4 +335,44 @@ public class DummyConnection implements Connection | |
{ | |
return false; | |
} | |
+ | |
+ /* | |
+ * This method was introduced by Java7's java.sql.Driver and breaks backwards compatibility. | |
+ */ | |
+ public int getNetworkTimeout() throws SQLException | |
+ { | |
+ return 0; | |
+ } | |
+ | |
+ /* | |
+ * This method was introduced by Java7's java.sql.Driver and breaks backwards compatibility. | |
+ */ | |
+ public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException | |
+ { | |
+ // not implemented | |
+ } | |
+ | |
+ /* | |
+ * This method was introduced by Java7's java.sql.Driver and breaks backwards compatibility. | |
+ */ | |
+ public void abort(Executor executor) throws SQLException | |
+ { | |
+ // not implemented | |
+ } | |
+ | |
+ /* | |
+ * This method was introduced by Java7's java.sql.Driver and breaks backwards compatibility. | |
+ */ | |
+ public String getSchema() throws SQLException | |
+ { | |
+ return null; | |
+ } | |
+ | |
+ /* | |
+ * This method was introduced by Java7's java.sql.Driver and breaks backwards compatibility. | |
+ */ | |
+ public void setSchema(String schema) throws SQLException | |
+ { | |
+ // not implemented | |
+ } | |
} | |
diff --git a/deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/datasource/DummyJdbcDriver.java b/deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/datasource/DummyJdbcDriver.java | |
index f0f75a1..3886250 100644 | |
--- a/deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/datasource/DummyJdbcDriver.java | |
+++ b/deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/datasource/DummyJdbcDriver.java | |
@@ -22,7 +22,9 @@ import java.sql.Connection; | |
import java.sql.Driver; | |
import java.sql.DriverPropertyInfo; | |
import java.sql.SQLException; | |
+import java.sql.SQLFeatureNotSupportedException; | |
import java.util.Properties; | |
+import java.util.logging.Logger; | |
/** | |
* A dummy JDBC driver for use in our unit tests | |
@@ -64,4 +66,12 @@ public class DummyJdbcDriver implements Driver | |
{ | |
return true; | |
} | |
+ | |
+ /* | |
+ * This method was introduced by Java7's java.sql.Driver and breaks backwards compatibility. | |
+ */ | |
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException | |
+ { | |
+ return null; | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment