void-packages/srcpkgs/hsqldb1.8.0/patches/006-java-7.patch

315 lines
11 KiB
Diff

--- a/build/build.xml
+++ b/build/build.xml
@@ -98,16 +98,24 @@ examples:
<echo message="ant.java.hasjsse=${ant.java.hasjsse}" />
</target>
- <target name="javaversion6">
+ <target name="javaversion7" unless="ant.java.iscjavaset">
+ <available classname="java.util.Objects" property="ant.java.iscjava17"/>
+ <available classname="java.util.Objects" property="ant.java.iscjavaset"/>
+ </target>
+
+ <target name="javaversion6" depends="javaversion7" unless="ant.java.iscjavaset">
<available classname="java.net.IDN" property="ant.java.iscjava16"/>
+ <available classname="java.net.IDN" property="ant.java.iscjavaset"/>
</target>
- <target name="javaversion4" depends="javaversion6" unless="ant.java.iscjava16">
+ <target name="javaversion4" depends="javaversion6" unless="ant.java.iscjavaset">
<available classname="java.nio.Buffer" property="ant.java.iscjava14"/>
+ <available classname="java.nio.Buffer" property="ant.java.iscjavaset"/>
</target>
- <target name="javaversion2" depends="javaversion4" unless="ant.java.iscjava14">
+ <target name="javaversion2" depends="javaversion4" unless="ant.java.iscjavaset">
<available classname="java.lang.ref.Reference" property="ant.java.iscjava12"/>
+ <available classname="java.lang.ref.Reference" property="ant.java.iscjavaset"/>
</target>
<target name="-prepare" depends="init,javaversion2">
@@ -166,6 +174,7 @@ examples:
<java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
<arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
<arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
+ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/>
<arg file="${src}/org/hsqldb/persist/LockFile.java"/>
<arg file="${src}/org/hsqldb/persist/Logger.java"/>
@@ -183,6 +192,7 @@ examples:
<java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
<arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
<arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
+ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
@@ -210,6 +220,7 @@ examples:
<arg value="+JAVA2FULL"/>
<arg value="-JAVA4"/>
<arg value="-JAVA6"/>
+ <arg value="-JAVA7"/>
</java>
</target>
@@ -218,6 +229,7 @@ examples:
<java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
<arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
<arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
+ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
@@ -244,6 +256,7 @@ examples:
<arg value="+JAVA2FULL"/>
<arg value="+JAVA4"/>
<arg value="-JAVA6"/>
+ <arg value="-JAVA7"/>
</java>
</target>
@@ -253,6 +266,43 @@ examples:
<java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
<arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
<arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
+ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcCallableStatement.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcClob.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcConnection.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcParameterMetaData.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcPreparedStatement.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSet.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSetMetaData.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/>
+ <arg file="${src}/org/hsqldb/persist/LockFile.java"/>
+ <arg file="${src}/org/hsqldb/persist/Logger.java"/>
+ <arg file="${src}/org/hsqldb/persist/ScaledRAFile.java"/>
+ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
+ <arg file="${src}/org/hsqldb/util/DatabaseManager.java"/>
+ <arg file="${src}/org/hsqldb/util/ConnectionDialogCommon.java"/>
+ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/>
+ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
+ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/>
+ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
+ <arg file="${src}/org/hsqldb/HsqlDateTime.java"/>
+ <arg value="+JAVA2"/>
+ <arg value="+JAVA2FULL"/>
+ <arg value="+JAVA4"/>
+ <arg value="+JAVA6"/>
+ <arg value="-JAVA7"/>
+ </java>
+ </target>
+
+ <target name="switchtojdk17" depends="switchtojdk16"
+ description="self explanatory" if="ant.java.iscjava17">
+ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
+ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
+ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
+ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
<arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
@@ -279,10 +329,11 @@ examples:
<arg value="+JAVA2FULL"/>
<arg value="+JAVA4"/>
<arg value="+JAVA6"/>
+ <arg value="+JAVA7"/>
</java>
</target>
- <target name="store" depends="switchtojdk16"
+ <target name="store" depends="switchtojdk17"
description="compiles the /store folder">
<javac srcdir="${src}"
destdir="classes"
--- a/src/org/hsqldb/jdbc/jdbcCallableStatement.java
+++ b/src/org/hsqldb/jdbc/jdbcCallableStatement.java
@@ -3375,4 +3375,18 @@ implements CallableStatement {
}
//#endif JAVA6
+
+//#ifdef JAVA7
+ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public <T> T getObject(int ColumnIndex, Class<T> type) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+
+//#endif JAVA7
}
--- a/src/org/hsqldb/jdbc/jdbcConnection.java
+++ b/src/org/hsqldb/jdbc/jdbcConnection.java
@@ -48,6 +48,12 @@ import java.sql.SQLClientInfoException;
import java.sql.SQLXML;
//#endif JAVA6
+
+//#ifdef JAVA7
+import java.util.concurrent.Executor;
+
+//#endif JAVA7
+
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.SQLWarning;
@@ -2793,4 +2799,31 @@ public class jdbcConnection implements C
}
//#endif JAVA6
+
+//#ifdef JAVA7
+ public int getNetworkTimeout() throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setNetworkTimeout(Executor executor, int millis) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void abort(Executor executor) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public String getSchema() throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void setSchema(String schema) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+//#endif JAVA7
}
--- a/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java
+++ b/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java
@@ -5693,4 +5693,21 @@ public class jdbcDatabaseMetaData implem
}
//#endif JAVA6
+
+
+//#ifdef JAVA7
+ public boolean generatedKeyAlwaysReturned() throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public ResultSet getPseudoColumns(String catalog, String schemaPattern,
+ String tableNamePattern, String columnNamePattern) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+
+//#endif JAVA7
+
}
--- a/src/org/hsqldb/jdbc/jdbcDataSource.java
+++ b/src/org/hsqldb/jdbc/jdbcDataSource.java
@@ -47,6 +47,11 @@ import javax.sql.DataSource;
//#endif JAVA4
import org.hsqldb.jdbcDriver;
+//#ifdef JAVA7
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
+//#endif JAVA7
+
// boucherb@users 20040411 - doc 1.7.2 - javadoc updates toward 1.7.2 final
/**
@@ -323,4 +328,12 @@ public class jdbcDataSource implements S
}
//#endif JAVA6
+
+//#ifdef JAVA7
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException
+ {
+ throw new SQLFeatureNotSupportedException("Not supported yet.");
+ }
+
+//#endif JAVA7
}
--- a/src/org/hsqldb/jdbc/jdbcResultSet.java
+++ b/src/org/hsqldb/jdbc/jdbcResultSet.java
@@ -5324,4 +5324,19 @@ public class jdbcResultSet implements Re
}
//#endif JAVA6
+
+//#ifdef JAVA7
+
+ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public <T> T getObject(int columnNum, Class<T> type) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+//#endif JAVA7
+
}
--- a/src/org/hsqldb/jdbc/jdbcStatement.java
+++ b/src/org/hsqldb/jdbc/jdbcStatement.java
@@ -1608,4 +1608,16 @@ public class jdbcStatement implements St
throw new UnsupportedOperationException("Not supported yet.");
}
//#endif JAVA6
+
+//#ifdef JAVA7
+ public boolean isCloseOnCompletion() throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public void closeOnCompletion() throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+//#endif JAVA7
}
--- a/src/org/hsqldb/jdbcDriver.java
+++ b/src/org/hsqldb/jdbcDriver.java
@@ -42,6 +42,11 @@ import org.hsqldb.jdbc.jdbcConnection;
import org.hsqldb.persist.HsqlDatabaseProperties;
import org.hsqldb.persist.HsqlProperties;
+//#ifdef JAVA7
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
+//#endif JAVA7
+
// fredt@users 20011220 - patch 1.7.0 by fredt
// new version numbering scheme
// fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping
@@ -321,4 +326,12 @@ public class jdbcDriver implements Drive
DriverManager.registerDriver(new jdbcDriver());
} catch (Exception e) {}
}
+
+//#ifdef JAVA7
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException
+ {
+ throw new SQLFeatureNotSupportedException("Not supported yet.");
+ }
+
+//#endif JAVA7
}