提交 4ff230dc authored 作者: Thomas Mueller's avatar Thomas Mueller

Remove support for JDK 1.3

上级 4416c292
...@@ -292,23 +292,18 @@ public class TestMetaData extends TestBase { ...@@ -292,23 +292,18 @@ public class TestMetaData extends TestBase {
assertEquals(".", meta.getCatalogSeparator()); assertEquals(".", meta.getCatalogSeparator());
assertEquals("catalog", meta.getCatalogTerm()); assertEquals("catalog", meta.getCatalogTerm());
assertTrue(meta.getConnection() == conn); assertTrue(meta.getConnection() == conn);
if (config.jdk14) { String versionStart = meta.getDatabaseMajorVersion() + "." + meta.getDatabaseMinorVersion();
String versionStart = meta.getDatabaseMajorVersion() + "." + meta.getDatabaseMinorVersion(); assertTrue(meta.getDatabaseProductVersion().startsWith(versionStart));
assertTrue(meta.getDatabaseProductVersion().startsWith(versionStart)); assertEquals(meta.getDatabaseMajorVersion(), meta.getDriverMajorVersion());
assertEquals(meta.getDatabaseMajorVersion(), meta.getDriverMajorVersion()); assertEquals(meta.getDatabaseMinorVersion(), meta.getDriverMinorVersion());
assertEquals(meta.getDatabaseMinorVersion(), meta.getDriverMinorVersion()); int majorVersion = 4;
int majorVersion = 3; assertEquals(majorVersion, meta.getJDBCMajorVersion());
//## Java 1.6 ## assertEquals(0, meta.getJDBCMinorVersion());
majorVersion = 4;
//*/
assertEquals(majorVersion, meta.getJDBCMajorVersion());
assertEquals(0, meta.getJDBCMinorVersion());
}
assertEquals("H2", meta.getDatabaseProductName()); assertEquals("H2", meta.getDatabaseProductName());
assertEquals(Connection.TRANSACTION_READ_COMMITTED, meta.getDefaultTransactionIsolation()); assertEquals(Connection.TRANSACTION_READ_COMMITTED, meta.getDefaultTransactionIsolation());
assertEquals("H2 JDBC Driver", meta.getDriverName()); assertEquals("H2 JDBC Driver", meta.getDriverName());
String versionStart = meta.getDriverMajorVersion() + "." + meta.getDriverMinorVersion(); versionStart = meta.getDriverMajorVersion() + "." + meta.getDriverMinorVersion();
assertTrue(meta.getDriverVersion().startsWith(versionStart)); assertTrue(meta.getDriverVersion().startsWith(versionStart));
assertEquals("", meta.getExtraNameCharacters()); assertEquals("", meta.getExtraNameCharacters());
assertEquals("\"", meta.getIdentifierQuoteString()); assertEquals("\"", meta.getIdentifierQuoteString());
...@@ -333,11 +328,11 @@ public class TestMetaData extends TestBase { ...@@ -333,11 +328,11 @@ public class TestMetaData extends TestBase {
assertEquals(0, meta.getMaxTablesInSelect()); assertEquals(0, meta.getMaxTablesInSelect());
assertEquals(0, meta.getMaxUserNameLength()); assertEquals(0, meta.getMaxUserNameLength());
assertEquals("procedure", meta.getProcedureTerm()); assertEquals("procedure", meta.getProcedureTerm());
if (config.jdk14) {
assertEquals(ResultSet.CLOSE_CURSORS_AT_COMMIT, meta.getResultSetHoldability()); assertEquals(ResultSet.CLOSE_CURSORS_AT_COMMIT, meta.getResultSetHoldability());
assertEquals(DatabaseMetaData.sqlStateSQL99, meta.getSQLStateType()); assertEquals(DatabaseMetaData.sqlStateSQL99, meta.getSQLStateType());
assertFalse(meta.locatorsUpdateCopy()); assertFalse(meta.locatorsUpdateCopy());
}
assertEquals("schema", meta.getSchemaTerm()); assertEquals("schema", meta.getSchemaTerm());
assertEquals("\\", meta.getSearchStringEscape()); assertEquals("\\", meta.getSearchStringEscape());
assertEquals("LIMIT,MINUS,ROWNUM,SYSDATE,SYSTIME,SYSTIMESTAMP,TODAY", meta.getSQLKeywords()); assertEquals("LIMIT,MINUS,ROWNUM,SYSDATE,SYSTIME,SYSTIMESTAMP,TODAY", meta.getSQLKeywords());
...@@ -400,11 +395,11 @@ public class TestMetaData extends TestBase { ...@@ -400,11 +395,11 @@ public class TestMetaData extends TestBase {
assertTrue(meta.supportsExpressionsInOrderBy()); assertTrue(meta.supportsExpressionsInOrderBy());
assertFalse(meta.supportsExtendedSQLGrammar()); assertFalse(meta.supportsExtendedSQLGrammar());
assertFalse(meta.supportsFullOuterJoins()); assertFalse(meta.supportsFullOuterJoins());
if (config.jdk14) {
assertTrue(meta.supportsGetGeneratedKeys()); assertTrue(meta.supportsGetGeneratedKeys());
assertTrue(meta.supportsMultipleOpenResults()); assertTrue(meta.supportsMultipleOpenResults());
assertFalse(meta.supportsNamedParameters()); assertFalse(meta.supportsNamedParameters());
}
assertTrue(meta.supportsGroupBy()); assertTrue(meta.supportsGroupBy());
assertTrue(meta.supportsGroupByBeyondSelect()); assertTrue(meta.supportsGroupByBeyondSelect());
assertTrue(meta.supportsGroupByUnrelated()); assertTrue(meta.supportsGroupByUnrelated());
...@@ -431,12 +426,12 @@ public class TestMetaData extends TestBase { ...@@ -431,12 +426,12 @@ public class TestMetaData extends TestBase {
assertTrue(meta.supportsResultSetConcurrency(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE)); assertTrue(meta.supportsResultSetConcurrency(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE));
assertFalse(meta.supportsResultSetConcurrency(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY)); assertFalse(meta.supportsResultSetConcurrency(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY));
assertFalse(meta.supportsResultSetConcurrency(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE)); assertFalse(meta.supportsResultSetConcurrency(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE));
if (config.jdk14) {
assertFalse(meta.supportsResultSetHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT)); assertFalse(meta.supportsResultSetHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT));
assertTrue(meta.supportsResultSetHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT)); assertTrue(meta.supportsResultSetHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT));
assertTrue(meta.supportsSavepoints()); assertTrue(meta.supportsSavepoints());
assertFalse(meta.supportsStatementPooling()); assertFalse(meta.supportsStatementPooling());
}
assertTrue(meta.supportsResultSetType(ResultSet.TYPE_FORWARD_ONLY)); assertTrue(meta.supportsResultSetType(ResultSet.TYPE_FORWARD_ONLY));
assertTrue(meta.supportsResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE)); assertTrue(meta.supportsResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE));
assertFalse(meta.supportsResultSetType(ResultSet.TYPE_SCROLL_SENSITIVE)); assertFalse(meta.supportsResultSetType(ResultSet.TYPE_SCROLL_SENSITIVE));
......
...@@ -80,9 +80,7 @@ public class TestPreparedStatement extends TestBase { ...@@ -80,9 +80,7 @@ public class TestPreparedStatement extends TestBase {
testCasewhen(conn); testCasewhen(conn);
testSubquery(conn); testSubquery(conn);
testObject(conn); testObject(conn);
if (config.jdk14) { testIdentity(conn);
testIdentity(conn);
}
testDataTypes(conn); testDataTypes(conn);
testGetMoreResults(conn); testGetMoreResults(conn);
testBlob(conn); testBlob(conn);
......
...@@ -38,15 +38,11 @@ public class TestStatement extends TestBase { ...@@ -38,15 +38,11 @@ public class TestStatement extends TestBase {
deleteDb("statement"); deleteDb("statement");
conn = getConnection("statement"); conn = getConnection("statement");
testTraceError(); testTraceError();
if (config.jdk14) { testSavepoint();
testSavepoint();
}
testConnectionRollback(); testConnectionRollback();
testStatement(); testStatement();
if (config.jdk14) { testIdentityMerge();
testIdentityMerge(); testIdentity();
testIdentity();
}
conn.close(); conn.close();
deleteDb("statement"); deleteDb("statement");
} }
...@@ -183,9 +179,7 @@ public class TestStatement extends TestBase { ...@@ -183,9 +179,7 @@ public class TestStatement extends TestBase {
// this method should not throw an exception - if not supported, this // this method should not throw an exception - if not supported, this
// calls are ignored // calls are ignored
if (config.jdk14) { assertEquals(ResultSet.HOLD_CURSORS_OVER_COMMIT, stat.getResultSetHoldability());
assertEquals(ResultSet.HOLD_CURSORS_OVER_COMMIT, stat.getResultSetHoldability());
}
assertEquals(ResultSet.CONCUR_READ_ONLY, stat.getResultSetConcurrency()); assertEquals(ResultSet.CONCUR_READ_ONLY, stat.getResultSetConcurrency());
stat.cancel(); stat.cancel();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论