diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-02-08 16:03:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-08 16:04:35 +0000 |
commit | 7dbfc0012cc75e7dac9a416b53149ad8ec33f071 (patch) | |
tree | 4d2965f96db92102257cb40289ce74c5a997f18d | |
parent | 1f77a5e8d5bf8a7f1b7bd7206996d2b2efc59462 (diff) |
make hsqldb build with java 1.7
-rwxr-xr-x | hsqldb/makefile.mk | 3 | ||||
-rw-r--r-- | hsqldb/patches/jdbc-4.1.patch | 267 |
2 files changed, 269 insertions, 1 deletions
diff --git a/hsqldb/makefile.mk b/hsqldb/makefile.mk index 8b3d5b131ada..2e9fa8a21af8 100755 --- a/hsqldb/makefile.mk +++ b/hsqldb/makefile.mk | |||
@@ -56,7 +56,8 @@ CONVERTFILES=build$/build.xml \ | |||
56 | PATCH_FILES=patches$/i96823.patch \ | 56 | PATCH_FILES=patches$/i96823.patch \ |
57 | patches$/i97032.patch \ | 57 | patches$/i97032.patch \ |
58 | patches$/i103528.patch \ | 58 | patches$/i103528.patch \ |
59 | patches$/i104901.patch | 59 | patches$/i104901.patch \ |
60 | patches$/jdbc-4.1.patch | ||
60 | 61 | ||
61 | .IF "$(JAVACISGCJ)"=="yes" | 62 | .IF "$(JAVACISGCJ)"=="yes" |
62 | JAVA_HOME= | 63 | JAVA_HOME= |
diff --git a/hsqldb/patches/jdbc-4.1.patch b/hsqldb/patches/jdbc-4.1.patch new file mode 100644 index 000000000000..89149c413cec --- /dev/null +++ b/hsqldb/patches/jdbc-4.1.patch | |||
@@ -0,0 +1,267 @@ | |||
1 | --- misc/hsqldb/build/build.xml 2012-02-08 15:14:42.827123541 +0000 | ||
2 | +++ misc/build/hsqldb/build/build.xml 2012-02-08 15:21:43.827722388 +0000 | ||
3 | @@ -98,7 +98,11 @@ | ||
4 | <echo message="ant.java.hasjsse=${ant.java.hasjsse}" /> | ||
5 | </target> | ||
6 | |||
7 | - <target name="javaversion6"> | ||
8 | + <target name="javaversion7"> | ||
9 | + <available classname="java.util.Objects" property="ant.java.iscjava17"/> | ||
10 | + </target> | ||
11 | + | ||
12 | + <target name="javaversion6" depends="javaversion7" unless="ant.java.iscjava17"> | ||
13 | <available classname="java.net.IDN" property="ant.java.iscjava16"/> | ||
14 | </target> | ||
15 | |||
16 | @@ -210,6 +214,7 @@ | ||
17 | <arg value="+JAVA2FULL"/> | ||
18 | <arg value="-JAVA4"/> | ||
19 | <arg value="-JAVA6"/> | ||
20 | + <arg value="-JAVA7"/> | ||
21 | </java> | ||
22 | </target> | ||
23 | |||
24 | @@ -244,6 +249,7 @@ | ||
25 | <arg value="+JAVA2FULL"/> | ||
26 | <arg value="+JAVA4"/> | ||
27 | <arg value="-JAVA6"/> | ||
28 | + <arg value="-JAVA7"/> | ||
29 | </java> | ||
30 | </target> | ||
31 | |||
32 | @@ -279,10 +285,47 @@ | ||
33 | <arg value="+JAVA2FULL"/> | ||
34 | <arg value="+JAVA4"/> | ||
35 | <arg value="+JAVA6"/> | ||
36 | + <arg value="+JAVA7"/> | ||
37 | + </java> | ||
38 | + </target> | ||
39 | + | ||
40 | + <target name="switchtojdk17" depends="switchtojdk16" | ||
41 | + description="self explanatory" if="ant.java.iscjava17"> | ||
42 | + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > | ||
43 | + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> | ||
44 | + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> | ||
45 | + <arg file="${src}/org/hsqldb/jdbcDriver.java"/> | ||
46 | + <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> | ||
47 | + <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> | ||
48 | + <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> | ||
49 | + <arg file="${src}/org/hsqldb/jdbc/jdbcCallableStatement.java"/> | ||
50 | + <arg file="${src}/org/hsqldb/jdbc/jdbcClob.java"/> | ||
51 | + <arg file="${src}/org/hsqldb/jdbc/jdbcConnection.java"/> | ||
52 | + <arg file="${src}/org/hsqldb/jdbc/jdbcParameterMetaData.java"/> | ||
53 | + <arg file="${src}/org/hsqldb/jdbc/jdbcPreparedStatement.java"/> | ||
54 | + <arg file="${src}/org/hsqldb/jdbc/jdbcResultSet.java"/> | ||
55 | + <arg file="${src}/org/hsqldb/jdbc/jdbcResultSetMetaData.java"/> | ||
56 | + <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/> | ||
57 | + <arg file="${src}/org/hsqldb/persist/LockFile.java"/> | ||
58 | + <arg file="${src}/org/hsqldb/persist/Logger.java"/> | ||
59 | + <arg file="${src}/org/hsqldb/persist/ScaledRAFile.java"/> | ||
60 | + <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> | ||
61 | + <arg file="${src}/org/hsqldb/util/DatabaseManager.java"/> | ||
62 | + <arg file="${src}/org/hsqldb/util/ConnectionDialogCommon.java"/> | ||
63 | + <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/> | ||
64 | + <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> | ||
65 | + <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/> | ||
66 | + <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> | ||
67 | + <arg file="${src}/org/hsqldb/HsqlDateTime.java"/> | ||
68 | + <arg value="+JAVA2"/> | ||
69 | + <arg value="+JAVA2FULL"/> | ||
70 | + <arg value="+JAVA4"/> | ||
71 | + <arg value="+JAVA6"/> | ||
72 | + <arg value="+JAVA7"/> | ||
73 | </java> | ||
74 | </target> | ||
75 | |||
76 | - <target name="store" depends="switchtojdk16" | ||
77 | + <target name="store" depends="switchtojdk17" | ||
78 | description="compiles the /store folder"> | ||
79 | <javac srcdir="${src}" | ||
80 | destdir="classes" | ||
81 | --- misc/hsqldb/src/org/hsqldb/jdbc/jdbcCallableStatement.java 2012-02-08 15:14:42.802123563 +0000 | ||
82 | +++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcCallableStatement.java 2012-02-08 15:47:35.842635642 +0000 | ||
83 | @@ -3375,4 +3375,18 @@ | ||
84 | } | ||
85 | |||
86 | //#endif JAVA6 | ||
87 | + | ||
88 | +//#ifdef JAVA7 | ||
89 | + public <T> T getObject(String columnLabel, Class<T> type) throws SQLException | ||
90 | + { | ||
91 | + throw new UnsupportedOperationException("Not supported yet."); | ||
92 | + } | ||
93 | + | ||
94 | + public <T> T getObject(int ColumnIndex, Class<T> type) throws SQLException | ||
95 | + { | ||
96 | + throw new UnsupportedOperationException("Not supported yet."); | ||
97 | + } | ||
98 | + | ||
99 | + | ||
100 | +//#endif JAVA7 | ||
101 | } | ||
102 | --- misc/hsqldb/src/org/hsqldb/jdbc/jdbcConnection.java 2012-02-08 15:14:42.802123563 +0000 | ||
103 | +++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcConnection.java 2012-02-08 15:47:35.851635628 +0000 | ||
104 | @@ -48,6 +48,12 @@ | ||
105 | import java.sql.SQLXML; | ||
106 | |||
107 | //#endif JAVA6 | ||
108 | + | ||
109 | +//#ifdef JAVA7 | ||
110 | +import java.util.concurrent.Executor; | ||
111 | + | ||
112 | +//#endif JAVA7 | ||
113 | + | ||
114 | import java.sql.PreparedStatement; | ||
115 | import java.sql.SQLException; | ||
116 | import java.sql.SQLWarning; | ||
117 | @@ -2793,4 +2799,31 @@ | ||
118 | } | ||
119 | |||
120 | //#endif JAVA6 | ||
121 | + | ||
122 | +//#ifdef JAVA7 | ||
123 | + public int getNetworkTimeout() throws SQLException | ||
124 | + { | ||
125 | + throw new UnsupportedOperationException("Not supported yet."); | ||
126 | + } | ||
127 | + | ||
128 | + public void setNetworkTimeout(Executor executor, int millis) throws SQLException | ||
129 | + { | ||
130 | + throw new UnsupportedOperationException("Not supported yet."); | ||
131 | + } | ||
132 | + | ||
133 | + public void abort(Executor executor) throws SQLException | ||
134 | + { | ||
135 | + throw new UnsupportedOperationException("Not supported yet."); | ||
136 | + } | ||
137 | + | ||
138 | + public String getSchema() throws SQLException | ||
139 | + { | ||
140 | + throw new UnsupportedOperationException("Not supported yet."); | ||
141 | + } | ||
142 | + | ||
143 | + public void setSchema(String schema) throws SQLException | ||
144 | + { | ||
145 | + throw new UnsupportedOperationException("Not supported yet."); | ||
146 | + } | ||
147 | +//#endif JAVA7 | ||
148 | } | ||
149 | --- misc/hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java 2012-02-08 15:14:42.802123563 +0000 | ||
150 | +++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java 2012-02-08 15:47:35.835635654 +0000 | ||
151 | @@ -5693,4 +5693,21 @@ | ||
152 | } | ||
153 | |||
154 | //#endif JAVA6 | ||
155 | + | ||
156 | + | ||
157 | +//#ifdef JAVA7 | ||
158 | + public boolean generatedKeyAlwaysReturned() throws SQLException | ||
159 | + { | ||
160 | + throw new UnsupportedOperationException("Not supported yet."); | ||
161 | + } | ||
162 | + | ||
163 | + public ResultSet getPseudoColumns(String catalog, String schemaPattern, | ||
164 | + String tableNamePattern, String columnNamePattern) throws SQLException | ||
165 | + { | ||
166 | + throw new UnsupportedOperationException("Not supported yet."); | ||
167 | + } | ||
168 | + | ||
169 | + | ||
170 | +//#endif JAVA7 | ||
171 | + | ||
172 | } | ||
173 | --- misc/hsqldb/src/org/hsqldb/jdbc/jdbcDataSource.java 2012-02-08 15:14:42.802123563 +0000 | ||
174 | +++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcDataSource.java 2012-02-08 15:47:35.836635653 +0000 | ||
175 | @@ -47,6 +47,11 @@ | ||
176 | //#endif JAVA4 | ||
177 | import org.hsqldb.jdbcDriver; | ||
178 | |||
179 | +//#ifdef JAVA7 | ||
180 | +import java.sql.SQLFeatureNotSupportedException; | ||
181 | +import java.util.logging.Logger; | ||
182 | +//#endif JAVA7 | ||
183 | + | ||
184 | // boucherb@users 20040411 - doc 1.7.2 - javadoc updates toward 1.7.2 final | ||
185 | |||
186 | /** | ||
187 | @@ -323,4 +328,12 @@ | ||
188 | } | ||
189 | |||
190 | //#endif JAVA6 | ||
191 | + | ||
192 | +//#ifdef JAVA7 | ||
193 | + public Logger getParentLogger() throws SQLFeatureNotSupportedException | ||
194 | + { | ||
195 | + throw new SQLFeatureNotSupportedException("Not supported yet."); | ||
196 | + } | ||
197 | + | ||
198 | +//#endif JAVA7 | ||
199 | } | ||
200 | --- misc/hsqldb/src/org/hsqldb/jdbc/jdbcResultSet.java 2012-02-08 15:14:42.802123563 +0000 | ||
201 | +++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcResultSet.java 2012-02-08 15:47:35.866635606 +0000 | ||
202 | @@ -5324,4 +5324,19 @@ | ||
203 | } | ||
204 | |||
205 | //#endif JAVA6 | ||
206 | + | ||
207 | +//#ifdef JAVA7 | ||
208 | + | ||
209 | + public <T> T getObject(String columnLabel, Class<T> type) throws SQLException | ||
210 | + { | ||
211 | + throw new UnsupportedOperationException("Not supported yet."); | ||
212 | + } | ||
213 | + | ||
214 | + public <T> T getObject(int columnNum, Class<T> type) throws SQLException | ||
215 | + { | ||
216 | + throw new UnsupportedOperationException("Not supported yet."); | ||
217 | + } | ||
218 | + | ||
219 | +//#endif JAVA7 | ||
220 | + | ||
221 | } | ||
222 | --- misc/hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java 2012-02-08 15:14:42.802123563 +0000 | ||
223 | +++ misc/build/hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java 2012-02-08 15:47:35.872635595 +0000 | ||
224 | @@ -1608,4 +1608,16 @@ | ||
225 | throw new UnsupportedOperationException("Not supported yet."); | ||
226 | } | ||
227 | //#endif JAVA6 | ||
228 | + | ||
229 | +//#ifdef JAVA7 | ||
230 | + public boolean isCloseOnCompletion() throws SQLException | ||
231 | + { | ||
232 | + throw new UnsupportedOperationException("Not supported yet."); | ||
233 | + } | ||
234 | + | ||
235 | + public void closeOnCompletion() throws SQLException | ||
236 | + { | ||
237 | + throw new UnsupportedOperationException("Not supported yet."); | ||
238 | + } | ||
239 | +//#endif JAVA7 | ||
240 | } | ||
241 | --- misc/hsqldb/src/org/hsqldb/jdbcDriver.java 2012-02-08 15:14:42.800123566 +0000 | ||
242 | +++ misc/build/hsqldb/src/org/hsqldb/jdbcDriver.java 2012-02-08 15:47:35.826635667 +0000 | ||
243 | @@ -42,6 +42,11 @@ | ||
244 | import org.hsqldb.persist.HsqlDatabaseProperties; | ||
245 | import org.hsqldb.persist.HsqlProperties; | ||
246 | |||
247 | +//#ifdef JAVA7 | ||
248 | +import java.sql.SQLFeatureNotSupportedException; | ||
249 | +import java.util.logging.Logger; | ||
250 | +//#endif JAVA7 | ||
251 | + | ||
252 | // fredt@users 20011220 - patch 1.7.0 by fredt | ||
253 | // new version numbering scheme | ||
254 | // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping | ||
255 | @@ -321,4 +326,12 @@ | ||
256 | DriverManager.registerDriver(new jdbcDriver()); | ||
257 | } catch (Exception e) {} | ||
258 | } | ||
259 | + | ||
260 | +//#ifdef JAVA7 | ||
261 | + public Logger getParentLogger() throws SQLFeatureNotSupportedException | ||
262 | + { | ||
263 | + throw new SQLFeatureNotSupportedException("Not supported yet."); | ||
264 | + } | ||
265 | + | ||
266 | +//#endif JAVA7 | ||
267 | } | ||