From a41e0dbde6c015d324838d9da33e5c71219e3eee Mon Sep 17 00:00:00 2001 From: Andy Pavlo Date: Fri, 7 Dec 2012 11:28:34 -0500 Subject: [PATCH] An attempt to fix compilation errors for Java7 #6 --- .../oltpbenchmark/benchmarks/tpcc/TPCCLoader.java | 14 ++++++++++---- .../jdbc/AutoIncrementPreparedStatement.java | 8 ++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java b/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java index 3926275fe..6fe291be4 100644 --- a/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java +++ b/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java @@ -681,6 +681,14 @@ public boolean isWrapperFor(Class arg0) throws SQLException { public T unwrap(Class arg0) throws SQLException { throw new NotImplementedException(); } + + // Java7 Fixes + public void closeOnCompletion() throws SQLException { + throw new SQLException(); + } + public boolean isCloseOnCompletion() throws SQLException { + throw new SQLException(); + } } @@ -1851,11 +1859,9 @@ public void load() throws SQLException { LOG.debug("------------- LoadJDBC Statistics --------------------"); LOG.debug(" Start Time = " + startDate); LOG.debug(" End Time = " + endDate); - LOG.debug(" Run Time = " + (int) runTimeMS / 1000 - + " Seconds"); + LOG.debug(" Run Time = " + (int) runTimeMS / 1000 + " Seconds"); LOG.debug(" Rows Loaded = " + totalRows + " Rows"); - LOG.debug("Rows Per Second = " - + (totalRows / (runTimeMS / 1000)) + " Rows/Sec"); + LOG.debug("Rows Per Second = " + (totalRows / (runTimeMS / 1000)) + " Rows/Sec"); LOG.debug("------------------------------------------------------"); } diff --git a/src/com/oltpbenchmark/jdbc/AutoIncrementPreparedStatement.java b/src/com/oltpbenchmark/jdbc/AutoIncrementPreparedStatement.java index b0283f977..4e7aab522 100644 --- a/src/com/oltpbenchmark/jdbc/AutoIncrementPreparedStatement.java +++ b/src/com/oltpbenchmark/jdbc/AutoIncrementPreparedStatement.java @@ -533,6 +533,14 @@ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLExcep public void setNClob(int parameterIndex, Reader reader) throws SQLException { this.stmt.setNClob(parameterIndex, reader); } + + // Java7 Fixes + public void closeOnCompletion() throws SQLException { + throw new SQLException(); + } + public boolean isCloseOnCompletion() throws SQLException { + throw new SQLException(); + } }