From 1101284e1f283a6e9652334198d366840dc77164 Mon Sep 17 00:00:00 2001 From: John Eberhard <102746950+jeber-ibm@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:54:43 -0600 Subject: [PATCH] Native profile tokens testing (#118) * Native Profile Handle Test changes Signed-off-by: John Eberhard * Cleanup JDRS testcases Signed-off-by: John Eberhard --------- Signed-off-by: John Eberhard --- src/test/JD/RS/JDRSAbsolute.java | 5 +- src/test/JD/RS/JDRSAfterLast.java | 5 +- src/test/JD/RS/JDRSBeforeFirst.java | 5 +- src/test/JD/RS/JDRSCachedRowSet.java | 4 +- src/test/JD/RS/JDRSCursorScroll.java | 12 +- .../JDRSCursorScrollInsensitiveFromCall.java | 3 +- .../RS/JDRSCursorScrollSensitiveFromCall.java | 3 +- src/test/JD/RS/JDRSCursorSensitivity.java | 2 +- src/test/JD/RS/JDRSDataCompression.java | 15 +- src/test/JD/RS/JDRSDeleteRow.java | 23 +- src/test/JD/RS/JDRSFetchSize.java | 3 +- src/test/JD/RS/JDRSFindColumn.java | 4 +- src/test/JD/RS/JDRSFirst.java | 5 +- src/test/JD/RS/JDRSGetArray.java | 3 +- src/test/JD/RS/JDRSGetAsciiStream.java | 3 +- src/test/JD/RS/JDRSGetBigDecimal.java | 84 +++- src/test/JD/RS/JDRSGetBinaryStream.java | 3 +- src/test/JD/RS/JDRSGetBlob.java | 3 +- src/test/JD/RS/JDRSGetBoolean.java | 3 +- src/test/JD/RS/JDRSGetByte.java | 3 +- src/test/JD/RS/JDRSGetBytes.java | 3 +- src/test/JD/RS/JDRSGetBytesBinary.java | 22 +- src/test/JD/RS/JDRSGetCharacterStream.java | 5 +- src/test/JD/RS/JDRSGetClob.java | 5 +- src/test/JD/RS/JDRSGetDate.java | 3 +- src/test/JD/RS/JDRSGetDouble.java | 3 +- src/test/JD/RS/JDRSGetFloat.java | 3 +- src/test/JD/RS/JDRSGetInt.java | 3 +- src/test/JD/RS/JDRSGetLong.java | 3 +- src/test/JD/RS/JDRSGetNCharacterStream.java | 3 +- src/test/JD/RS/JDRSGetNClob.java | 3 +- src/test/JD/RS/JDRSGetNString.java | 3 +- src/test/JD/RS/JDRSGetObject.java | 15 +- src/test/JD/RS/JDRSGetObject41.java | 48 +-- src/test/JD/RS/JDRSGetObjectUDT.java | 16 +- src/test/JD/RS/JDRSGetRef.java | 4 +- src/test/JD/RS/JDRSGetRow.java | 5 +- src/test/JD/RS/JDRSGetRowId.java | 4 +- src/test/JD/RS/JDRSGetRowTest.java | 2 - src/test/JD/RS/JDRSGetRow_Absolute.java | 4 +- src/test/JD/RS/JDRSGetRow_AfterLast.java | 4 +- src/test/JD/RS/JDRSGetRow_BeforeFirst.java | 4 +- src/test/JD/RS/JDRSGetRow_First.java | 4 +- src/test/JD/RS/JDRSGetRow_Last.java | 4 +- src/test/JD/RS/JDRSGetRow_Previous.java | 4 +- src/test/JD/RS/JDRSGetRow_Relative.java | 4 +- src/test/JD/RS/JDRSGetSQLXML.java | 4 +- src/test/JD/RS/JDRSGetShort.java | 4 +- src/test/JD/RS/JDRSGetString.java | 6 +- src/test/JD/RS/JDRSGetStringBIDI.java | 9 +- src/test/JD/RS/JDRSGetStringMixed.java | 9 +- src/test/JD/RS/JDRSGetStringUnsupported.java | 9 +- src/test/JD/RS/JDRSGetTime.java | 5 +- src/test/JD/RS/JDRSGetTimestamp.java | 8 +- src/test/JD/RS/JDRSGetURL.java | 5 +- src/test/JD/RS/JDRSGetUnicodeStream.java | 91 +++- src/test/JD/RS/JDRSInsertRow.java | 25 +- src/test/JD/RS/JDRSLast.java | 10 +- src/test/JD/RS/JDRSMisc.java | 4 +- src/test/JD/RS/JDRSMoveToCurrentRow.java | 20 +- src/test/JD/RS/JDRSMoveToInsertRow.java | 21 +- src/test/JD/RS/JDRSNext.java | 19 +- src/test/JD/RS/JDRSPrevious.java | 19 +- src/test/JD/RS/JDRSRefreshRow.java | 23 +- src/test/JD/RS/JDRSRelative.java | 17 +- src/test/JD/RS/JDRSStress.java | 6 +- src/test/JD/RS/JDRSStressDirectMap.java | 4 +- .../JD/RS/JDRSStressNoBlockPSDirectMap.java | 4 +- src/test/JD/RS/JDRSStressPS.java | 4 +- src/test/JD/RS/JDRSStressPSBatch.java | 4 +- src/test/JD/RS/JDRSStressPSDirectMap.java | 4 +- src/test/JD/RS/JDRSStressScroll.java | 4 +- src/test/JD/RS/JDRSStressScrollDirectMap.java | 4 +- src/test/JD/RS/JDRSStressScrollPS.java | 4 +- .../JD/RS/JDRSStressScrollPSDirectMap.java | 4 +- src/test/JD/RS/JDRSStressUpdatePS.java | 4 +- .../JD/RS/JDRSStressUpdatePSDirectMap.java | 4 +- src/test/JD/RS/JDRSTestcase.java | 22 +- src/test/JD/RS/JDRSUpdateAsciiStream.java | 24 +- src/test/JD/RS/JDRSUpdateBigDecimal.java | 388 +----------------- src/test/JD/RS/JDRSUpdateBinaryStream.java | 56 ++- src/test/JD/RS/JDRSUpdateBoolean.java | 15 +- src/test/JD/RS/JDRSUpdateByte.java | 16 +- src/test/JD/RS/JDRSUpdateBytes.java | 40 +- src/test/JD/RS/JDRSUpdateCharacterStream.java | 22 +- src/test/JD/RS/JDRSUpdateClob.java | 19 +- src/test/JD/RS/JDRSUpdateDB2Default.java | 20 +- src/test/JD/RS/JDRSUpdateDBDefault.java | 3 +- src/test/JD/RS/JDRSUpdateDate.java | 18 +- src/test/JD/RS/JDRSUpdateDouble.java | 110 +---- src/test/JD/RS/JDRSUpdateFloat.java | 38 +- src/test/JD/RS/JDRSUpdateInt.java | 15 +- src/test/JD/RS/JDRSUpdateLong.java | 16 +- .../JD/RS/JDRSUpdateNCharacterStream.java | 20 +- src/test/JD/RS/JDRSUpdateNClob.java | 21 +- src/test/JD/RS/JDRSUpdateNString.java | 29 +- src/test/JD/RS/JDRSUpdateNull.java | 16 +- src/test/JD/RS/JDRSUpdateObject.java | 117 +----- src/test/JD/RS/JDRSUpdateObjectSQLType.java | 123 +----- src/test/JD/RS/JDRSUpdateRow.java | 17 +- src/test/JD/RS/JDRSUpdateRowId.java | 42 +- src/test/JD/RS/JDRSUpdateSQLXML.java | 18 +- src/test/JD/RS/JDRSUpdateShort.java | 14 +- src/test/JD/RS/JDRSUpdateString.java | 15 +- src/test/JD/RS/JDRSUpdateTime.java | 96 ++--- src/test/JD/RS/JDRSUpdateTimestamp.java | 18 +- src/test/JD/RS/JDRSWarnings.java | 12 +- src/test/JD/RS/JDRSWasNull.java | 16 +- src/test/JD/RS/JDRSWrapper.java | 16 +- src/test/JD/RS/JDRowSetRSTestcase.java | 14 +- src/test/JDCleanSplfJdbc.java | 4 +- 111 files changed, 803 insertions(+), 1357 deletions(-) diff --git a/src/test/JD/RS/JDRSAbsolute.java b/src/test/JD/RS/JDRSAbsolute.java index 1c9eb56..c5dfa39 100644 --- a/src/test/JD/RS/JDRSAbsolute.java +++ b/src/test/JD/RS/JDRSAbsolute.java @@ -21,13 +21,13 @@ import test.JDTestcase; import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -64,7 +64,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSAbsolute (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -1105,6 +1105,7 @@ public void Var036 () /** absolute() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var037 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSAfterLast.java b/src/test/JD/RS/JDRSAfterLast.java index e19f000..345c0af 100644 --- a/src/test/JD/RS/JDRSAfterLast.java +++ b/src/test/JD/RS/JDRSAfterLast.java @@ -29,6 +29,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -71,7 +72,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSAfterLast (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -585,6 +586,7 @@ public void Var018 () /** afterLast() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var019 () { if (checkJdbc20 ()) { @@ -1950,6 +1952,7 @@ public void Var078 () /** afterLast() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var079 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSBeforeFirst.java b/src/test/JD/RS/JDRSBeforeFirst.java index b6cda53..0720696 100644 --- a/src/test/JD/RS/JDRSBeforeFirst.java +++ b/src/test/JD/RS/JDRSBeforeFirst.java @@ -30,6 +30,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -72,7 +73,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSBeforeFirst (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -601,6 +602,7 @@ public void Var018 () /** beforeFirst() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var019 () { if (checkJdbc20 ()) { @@ -1878,6 +1880,7 @@ public void Var068 () /** beforeFirst() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var069 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSCachedRowSet.java b/src/test/JD/RS/JDRSCachedRowSet.java index 792b717..87d962a 100644 --- a/src/test/JD/RS/JDRSCachedRowSet.java +++ b/src/test/JD/RS/JDRSCachedRowSet.java @@ -22,12 +22,12 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; import javax.naming.Context; import javax.naming.InitialContext; import javax.sql.DataSource; import javax.sql.RowSet; -import javax.sql.rowset.CachedRowSet; import com.ibm.as400.access.AS400; @@ -68,7 +68,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSCachedRowSet (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSCursorScroll.java b/src/test/JD/RS/JDRSCursorScroll.java index e666e85..a4fb8fa 100644 --- a/src/test/JD/RS/JDRSCursorScroll.java +++ b/src/test/JD/RS/JDRSCursorScroll.java @@ -67,7 +67,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSCursorScroll (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -81,7 +81,7 @@ public JDRSCursorScroll (AS400 systemObject, public JDRSCursorScroll (AS400 systemObject, String testName, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -1600,7 +1600,7 @@ public void Var049() { public void stressScroll(long seed, int RUNMILLIS, String info) { boolean success = true; - Vector log = new Vector(); + Vector log = new Vector(); StringBuffer sb = new StringBuffer(); String firstMethodString = null; @@ -1786,7 +1786,7 @@ public void stressScroll(long seed, int RUNMILLIS, String info) { if (!success) { sb.append(" -- Table is " + table49); sb.append(" -- Log is \n"); - Enumeration enumeration = log.elements(); + Enumeration enumeration = log.elements(); while (enumeration.hasMoreElements()) { sb.append((String) enumeration.nextElement()); sb.append("\n"); @@ -1827,7 +1827,7 @@ public void Var050() return; } boolean success=true; - Vector log = new Vector(); + Vector log = new Vector(); StringBuffer sb = new StringBuffer(); CallableStatement cs = null; @@ -1992,7 +1992,7 @@ public void Var050() if (!success) { sb.append(" -- Table is "+table49); sb.append(" -- Log is \n"); - Enumeration enumeration = log.elements(); + Enumeration enumeration = log.elements(); while (enumeration.hasMoreElements()) { sb.append((String) enumeration.nextElement()); sb.append("\n"); diff --git a/src/test/JD/RS/JDRSCursorScrollInsensitiveFromCall.java b/src/test/JD/RS/JDRSCursorScrollInsensitiveFromCall.java index 8a06fc9..7a3bd88 100644 --- a/src/test/JD/RS/JDRSCursorScrollInsensitiveFromCall.java +++ b/src/test/JD/RS/JDRSCursorScrollInsensitiveFromCall.java @@ -17,7 +17,6 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.sql.*; import java.util.*; @@ -47,7 +46,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSCursorScrollInsensitiveFromCall (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSCursorScrollSensitiveFromCall.java b/src/test/JD/RS/JDRSCursorScrollSensitiveFromCall.java index d102ef7..92e83f9 100644 --- a/src/test/JD/RS/JDRSCursorScrollSensitiveFromCall.java +++ b/src/test/JD/RS/JDRSCursorScrollSensitiveFromCall.java @@ -17,7 +17,6 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.sql.*; import java.util.*; @@ -47,7 +46,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSCursorScrollSensitiveFromCall (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSCursorSensitivity.java b/src/test/JD/RS/JDRSCursorSensitivity.java index ef8ecfa..b8d26e3 100644 --- a/src/test/JD/RS/JDRSCursorSensitivity.java +++ b/src/test/JD/RS/JDRSCursorSensitivity.java @@ -62,7 +62,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSCursorSensitivity (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSDataCompression.java b/src/test/JD/RS/JDRSDataCompression.java index f499baf..18b1b44 100644 --- a/src/test/JD/RS/JDRSDataCompression.java +++ b/src/test/JD/RS/JDRSDataCompression.java @@ -21,14 +21,11 @@ import java.io.FileOutputStream; import java.sql.Connection; -import java.sql.DataTruncation; -import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -71,7 +68,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSDataCompression (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -183,11 +180,11 @@ private boolean testDataCompression(String dc) rs.next(); boolean check = (rs.getInt(1) == 1); check = check && (rs.getString(2).equals(repeatingString_)); - check = check && (isEqual(rs.getBytes(3), repeatingBytes_)); + check = check && (areEqual(rs.getBytes(3), repeatingBytes_)); rs.next(); check = check && (rs.getInt(1) == 2); check = check && (rs.getString(2).equals(nonRepeatingString_)); - check = check && (isEqual(rs.getBytes(3), nonRepeatingBytes_)); + check = check && (areEqual(rs.getBytes(3), nonRepeatingBytes_)); rs.close(); @@ -227,8 +224,8 @@ private boolean testRLECompression(String dc, byte[] odd, byte[] even, String te String text3 = rs.getString(5); boolean check = true; - check = check && (isEqual(odd, odd2)); - check = check && (isEqual(even, even2)); + check = check && (areEqual(odd, odd2)); + check = check && (areEqual(even, even2)); check = check && (text.equals(text2)); check = check && (text.equals(text3)); check = check && (rs.next() == false); diff --git a/src/test/JD/RS/JDRSDeleteRow.java b/src/test/JD/RS/JDRSDeleteRow.java index f1c9923..b91d77e 100644 --- a/src/test/JD/RS/JDRSDeleteRow.java +++ b/src/test/JD/RS/JDRSDeleteRow.java @@ -21,7 +21,6 @@ import test.JDTestcase; import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; @@ -68,7 +67,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSDeleteRow (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -232,7 +231,7 @@ public void Var005() try { rs_.beforeFirst (); int rowCountBefore = 0; - Vector keysBefore = new Vector (); + Vector keysBefore = new Vector (); while (rs_.next ()) { ++rowCountBefore; keysBefore.addElement (rs_.getString ("C_KEY")); @@ -243,7 +242,7 @@ public void Var005() ResultSet rs2 = statement2_.executeQuery (select_); int rowCountAfter = 0; - Vector keysAfter = new Vector (); + Vector keysAfter = new Vector (); while (rs2.next ()) { ++rowCountAfter; keysAfter.addElement (rs2.getString ("C_KEY")); @@ -289,7 +288,7 @@ public void Var006() try { rs_.beforeFirst (); int rowCountBefore = 0; - Vector keysBefore = new Vector (); + Vector keysBefore = new Vector (); while (rs_.next ()) { ++rowCountBefore; keysBefore.addElement (rs_.getString ("C_KEY")); @@ -300,7 +299,7 @@ public void Var006() ResultSet rs2 = statement2_.executeQuery (select_); int rowCountAfter = 0; - Vector keysAfter = new Vector (); + Vector keysAfter = new Vector (); while (rs2.next ()) { ++rowCountAfter; keysAfter.addElement (rs2.getString ("C_KEY")); @@ -355,7 +354,7 @@ public void Var007() try { rs_.beforeFirst (); int rowCountBefore = 0; - Vector keysBefore = new Vector (); + Vector keysBefore = new Vector (); while (rs_.next ()) { ++rowCountBefore; keysBefore.addElement (rs_.getString ("C_KEY")); @@ -366,7 +365,7 @@ public void Var007() ResultSet rs2 = statement2_.executeQuery (select_); int rowCountAfter = 0; - Vector keysAfter = new Vector (); + Vector keysAfter = new Vector (); while (rs2.next ()) { ++rowCountAfter; keysAfter.addElement (rs2.getString ("C_KEY")); @@ -416,7 +415,7 @@ public void Var008() rs1.beforeFirst (); int rowCountBefore = 0; - Vector keysBefore = new Vector (); + Vector keysBefore = new Vector (); while (rs1.next ()) { ++rowCountBefore; keysBefore.addElement (rs1.getString ("C_KEY")); @@ -428,7 +427,7 @@ public void Var008() ResultSet rs2 = statement2_.executeQuery (select_); int rowCountAfter = 0; - Vector keysAfter = new Vector (); + Vector keysAfter = new Vector (); while (rs2.next ()) { ++rowCountAfter; keysAfter.addElement (rs2.getString ("C_KEY")); @@ -481,7 +480,7 @@ public void Var009() rs.beforeFirst (); int rowCountBefore = 0; - Vector keysBefore = new Vector (); + Vector keysBefore = new Vector (); while (rs.next ()) { ++rowCountBefore; keysBefore.addElement (rs.getString ("C_KEY")); @@ -492,7 +491,7 @@ public void Var009() ResultSet rs2 = statement2_.executeQuery (select_); int rowCountAfter = 0; - Vector keysAfter = new Vector (); + Vector keysAfter = new Vector (); while (rs2.next ()) { ++rowCountAfter; keysAfter.addElement (rs2.getString ("C_KEY")); diff --git a/src/test/JD/RS/JDRSFetchSize.java b/src/test/JD/RS/JDRSFetchSize.java index d70c156..6b46eff 100644 --- a/src/test/JD/RS/JDRSFetchSize.java +++ b/src/test/JD/RS/JDRSFetchSize.java @@ -27,6 +27,7 @@ import java.sql.Statement; import java.sql.DatabaseMetaData; import java.util.Hashtable; +import java.util.Vector; @@ -65,7 +66,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSFetchSize (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSFindColumn.java b/src/test/JD/RS/JDRSFindColumn.java index 392cabc..2fe1cf8 100644 --- a/src/test/JD/RS/JDRSFindColumn.java +++ b/src/test/JD/RS/JDRSFindColumn.java @@ -20,11 +20,11 @@ import test.JDTestcase; import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -60,7 +60,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSFindColumn (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSFirst.java b/src/test/JD/RS/JDRSFirst.java index 0a6101e..b23c329 100644 --- a/src/test/JD/RS/JDRSFirst.java +++ b/src/test/JD/RS/JDRSFirst.java @@ -30,6 +30,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -71,7 +72,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSFirst (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -587,6 +588,7 @@ public void Var018 () /** first() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var019 () { if (checkJdbc20 ()) { @@ -1946,6 +1948,7 @@ public void Var078 () /** first() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var079 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSGetArray.java b/src/test/JD/RS/JDRSGetArray.java index b6d142d..936c12f 100644 --- a/src/test/JD/RS/JDRSGetArray.java +++ b/src/test/JD/RS/JDRSGetArray.java @@ -27,6 +27,7 @@ import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -64,7 +65,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetArray (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetAsciiStream.java b/src/test/JD/RS/JDRSGetAsciiStream.java index 52934a9..228ebb4 100644 --- a/src/test/JD/RS/JDRSGetAsciiStream.java +++ b/src/test/JD/RS/JDRSGetAsciiStream.java @@ -30,6 +30,7 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -70,7 +71,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetAsciiStream (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetBigDecimal.java b/src/test/JD/RS/JDRSGetBigDecimal.java index fa2102f..cacc32e 100644 --- a/src/test/JD/RS/JDRSGetBigDecimal.java +++ b/src/test/JD/RS/JDRSGetBigDecimal.java @@ -26,6 +26,7 @@ import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -66,7 +67,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetBigDecimal (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -166,7 +167,8 @@ public void Var001() getBigDecimal() with 2 parameters - Should throw exception when the result set is closed. **/ - public void Var002() + @SuppressWarnings("deprecation") + public void Var002() { try { Statement s = connection_.createStatement (); @@ -208,6 +210,7 @@ public void Var003() getBigDecimal() with 2 parameters - Should throw exception when cursor is not pointing to a row. **/ + @SuppressWarnings("deprecation") public void Var004() { try { @@ -247,6 +250,7 @@ public void Var005() getBigDecimal() with 2 parameters - Should throw an exception when the column is an invalid index. **/ + @SuppressWarnings("deprecation") public void Var006() { try { @@ -287,6 +291,7 @@ public void Var007() getBigDecimal() with 2 parameters - Should throw an exception when the column is 0. **/ + @SuppressWarnings("deprecation") public void Var008() { try { @@ -327,6 +332,7 @@ public void Var009() getBigDecimal() with 2 parameters - Should throw an exception when the column is -1. **/ + @SuppressWarnings("deprecation") public void Var010() { try { @@ -365,6 +371,7 @@ public void Var011() /** getBigDecimal() with 2 parameters - Should work when the column index is valid. **/ + @SuppressWarnings("deprecation") public void Var012() { try { @@ -415,6 +422,7 @@ public void Var013() getBigDecimal() with 2 parameters - Should throw an exception when the column name is null. **/ + @SuppressWarnings("deprecation") public void Var014() { if (checkJdbc20 ()) { @@ -460,6 +468,7 @@ public void Var015() getBigDecimal() with 2 parameters - Should throw an exception when the column name is an empty string. **/ + @SuppressWarnings("deprecation") public void Var016() { try { @@ -500,6 +509,7 @@ public void Var017() getBigDecimal() - Should throw an exception when the column name is invalid. **/ + @SuppressWarnings("deprecation") public void Var018() { try { @@ -538,6 +548,7 @@ public void Var019() /** getBigDecimal() with 2 parameters - Should work when the column name is valid. **/ + @SuppressWarnings("deprecation") public void Var020() { try { @@ -558,7 +569,8 @@ public void Var020() getBigDecimal() with 2 parameters - Should throw an exception when the scale is -1. **/ - public void Var021() + @SuppressWarnings("deprecation") + public void Var021() { if (getDriver() == JDTestDriver.DRIVER_JCC ) { notApplicable("LUW does not throw exception when scale is -1"); @@ -581,7 +593,8 @@ public void Var021() /** getBigDecimal() with 2 parameters - Should work when the scale is 0. **/ - public void Var022() + @SuppressWarnings("deprecation") + public void Var022() { try { ResultSet rs = statement0_.executeQuery ("SELECT * FROM " @@ -600,7 +613,8 @@ public void Var022() /** getBigDecimal() with 2 parameters - Should work when the scale is 3. **/ - public void Var023() + @SuppressWarnings("deprecation") + public void Var023() { try { ResultSet rs = statement0_.executeQuery ("SELECT * FROM " @@ -639,7 +653,8 @@ public void Var024() /** getBigDecimal() with 2 parameters - Should work when an update is pending. **/ - public void Var025() + @SuppressWarnings("deprecation") + public void Var025() { if (checkJdbc20 ()) { try { @@ -680,7 +695,8 @@ public void Var026() /** getBigDecimal() with 2 parameters - Should work when an update has been done. **/ - public void Var027() + @SuppressWarnings("deprecation") + public void Var027() { if (checkJdbc20 ()) { try { @@ -723,7 +739,8 @@ public void Var028() getBigDecimal() with 2 parameters - Should work when the current row is the insert row, when an insert is pending. **/ - public void Var029() + @SuppressWarnings("deprecation") + public void Var029() { if (checkJdbc20 ()) { try { @@ -770,7 +787,8 @@ public void Var030() getBigDecimal() with 2 parameters - Should work when the current row is the insert row, when an insert has been done. **/ - public void Var031() + @SuppressWarnings("deprecation") + public void Var031() { if (getDriver() == JDTestDriver.DRIVER_JCC ) { notApplicable("JCC does not work when moving to insert row"); @@ -820,6 +838,7 @@ public void Var032() /** getBigDecimal() with 2 parameters - Should throw an exception on a deleted row. **/ + @SuppressWarnings("deprecation") public void Var033() { if (getDriver() == JDTestDriver.DRIVER_JCC ) { @@ -863,6 +882,7 @@ public void Var034 () /** getBigDecimal() with 2 parameters - Should return null when the column is NULL. **/ + @SuppressWarnings("deprecation") public void Var035 () { try { @@ -903,6 +923,7 @@ public void Var036 () /** getBigDecimal() with 2 parameters - Get from a SMALLINT, scale = 0. **/ + @SuppressWarnings("deprecation") public void Var037 () { try { @@ -926,6 +947,7 @@ public void Var037 () /** getBigDecimal() with 2 parameters - Get from a SMALLINT, scale = 3. **/ + @SuppressWarnings("deprecation") public void Var038 () { try { @@ -968,6 +990,7 @@ public void Var039 () /** getBigDecimal() with 2 parameters - Get from a INTEGER, scale = 0. **/ + @SuppressWarnings("deprecation") public void Var040 () { try { @@ -987,6 +1010,7 @@ public void Var040 () /** getBigDecimal() with 2 parameters - Get from a INTEGER, scale = 3. **/ + @SuppressWarnings("deprecation") public void Var041 () { try { @@ -1025,6 +1049,7 @@ public void Var042 () /** getBigDecimal() with 2 parameters - Get from a REAL, scale = 0. **/ + @SuppressWarnings("deprecation") public void Var043 () { try { @@ -1044,6 +1069,7 @@ public void Var043 () /** getBigDecimal() with 2 parameters - Get from a REAL, scale = 3. **/ + @SuppressWarnings("deprecation") public void Var044 () { try { @@ -1082,7 +1108,8 @@ public void Var045 () /** getBigDecimal() with 2 parameters - Get from a FLOAT, scale = 0. **/ - public void Var046 () + @SuppressWarnings("deprecation") + public void Var046 () { try { ResultSet rs = statement0_.executeQuery ("SELECT * FROM " @@ -1107,7 +1134,8 @@ public void Var046 () /** getBigDecimal() with 2 parameters - Get from a FLOAT, scale = 3. **/ - public void Var047 () + @SuppressWarnings("deprecation") + public void Var047 () { try { ResultSet rs = statement0_.executeQuery ("SELECT * FROM " @@ -1145,7 +1173,8 @@ public void Var048 () /** getBigDecimal() with 2 parameters - Get from a DOUBLE, scale = 0. **/ - public void Var049 () + @SuppressWarnings("deprecation") + public void Var049 () { try { ResultSet rs = statement0_.executeQuery ("SELECT * FROM " @@ -1170,6 +1199,7 @@ public void Var049 () /** getBigDecimal() with 2 parameters - Get from a DOUBLE, scale = 3. **/ + @SuppressWarnings("deprecation") public void Var050 () { try { @@ -1208,6 +1238,7 @@ public void Var051 () /** getBigDecimal() with 2 parameters - Get from a DECIMAL(5,0), scale = 0. **/ + @SuppressWarnings("deprecation") public void Var052 () { try { @@ -1227,6 +1258,7 @@ public void Var052 () /** getBigDecimal() with 2 parameters - Get from a DECIMAL(5,0), scale = 3. **/ + @SuppressWarnings("deprecation") public void Var053 () { try { @@ -1265,6 +1297,7 @@ public void Var054 () /** getBigDecimal() with 2 parameters - Get from a DECIMAL(10,5), scale = 0. **/ + @SuppressWarnings("deprecation") public void Var055 () { try { @@ -1292,6 +1325,7 @@ public void Var055 () /** getBigDecimal() with 2 parameters - Get from a DECIMAL(10,5), scale = 3. **/ + @SuppressWarnings("deprecation") public void Var056 () { try { @@ -1337,6 +1371,7 @@ public void Var057 () /** getBigDecimal() with 2 parameters - Get from a NUMERIC(5,0), scale = 0. **/ + @SuppressWarnings("deprecation") public void Var058 () { try { @@ -1356,6 +1391,7 @@ public void Var058 () /** getBigDecimal() with 2 parameters - Get from a NUMERIC(5,0), scale = 3. **/ + @SuppressWarnings("deprecation") public void Var059 () { try { @@ -1394,6 +1430,7 @@ public void Var060 () /** getBigDecimal() with 2 parameters - Get from a NUMERIC(10,5), scale = 0. **/ + @SuppressWarnings("deprecation") public void Var061 () { try { @@ -1413,6 +1450,7 @@ public void Var061 () /** getBigDecimal() with 2 parameters - Get from a NUMERIC(10,5), scale = 3. **/ + @SuppressWarnings("deprecation") public void Var062 () { try { @@ -1453,6 +1491,7 @@ public void Var063 () getBigDecimal() with 2 parameters - Get from a CHAR, where the value does not translate to an int. **/ + @SuppressWarnings("deprecation") public void Var064 () { try { @@ -1493,6 +1532,7 @@ public void Var065 () getBigDecimal() with 2 parameters - Get from a CHAR, where the value does translate to an int. **/ + @SuppressWarnings("deprecation") public void Var066 () { try { @@ -1534,6 +1574,7 @@ public void Var067 () the value does translate to an int, except that it has a decimal point. **/ + @SuppressWarnings("deprecation") public void Var068 () { try { @@ -1574,6 +1615,7 @@ public void Var069 () getBigDecimal() with 2 parameters - Get from a VARCHAR, where the value does not translate to an int. **/ + @SuppressWarnings("deprecation") public void Var070 () { try { @@ -1614,6 +1656,7 @@ public void Var071 () getBigDecimal() with 2 parameters - Get from a VARCHAR, where the value does translate to an int. **/ + @SuppressWarnings("deprecation") public void Var072 () { try { @@ -1654,6 +1697,7 @@ public void Var073 () getBigDecimal() with 2 parameters - Get from a VARCHAR, where the value does translate to an int, except that it has a decimal point **/ + @SuppressWarnings("deprecation") public void Var074 () { try { @@ -1699,6 +1743,7 @@ public void Var075 () /** getBigDecimal() with 2 parameters - Get from a BINARY. **/ + @SuppressWarnings("deprecation") public void Var076 () { try { @@ -1737,6 +1782,7 @@ public void Var077 () /** getBigDecimal() with 2 parameters - Get from a VARBINARY. **/ + @SuppressWarnings("deprecation") public void Var078 () { try { @@ -1777,6 +1823,7 @@ public void Var079 () /** getBigDecimal() with 2 parameters - Get from a CLOB. **/ + @SuppressWarnings("deprecation") public void Var080 () { if (checkLobSupport ()) { @@ -1819,7 +1866,8 @@ public void Var081 () /** getBigDecimal() with 2 parameters - Get from a DBCLOB. **/ - public void Var082 () + @SuppressWarnings("deprecation") + public void Var082 () { if (checkLobSupport ()) { try { @@ -1861,7 +1909,8 @@ public void Var083 () /** getBigDecimal() with 2 parameters - Get from a BLOB. **/ - public void Var084 () + @SuppressWarnings("deprecation") + public void Var084 () { if (checkLobSupport ()) { try { @@ -1901,6 +1950,7 @@ public void Var085 () /** getBigDecimal() with 2 parameters - Get from a DATE. **/ + @SuppressWarnings("deprecation") public void Var086 () { try { @@ -1939,6 +1989,7 @@ public void Var087 () /** getBigDecimal() with 2 parameters - Get from a TIME. **/ + @SuppressWarnings("deprecation") public void Var088 () { try { @@ -1977,6 +2028,7 @@ public void Var089 () /** getBigDecimal() with 2 parameters - Get from a TIMESTAMP. **/ + @SuppressWarnings("deprecation") public void Var090 () { try { @@ -2020,6 +2072,7 @@ public void Var091 () /** getBigDecimal() with 2 parameters - Get from a DATALINK. **/ + @SuppressWarnings("deprecation") public void Var092 () { if (checkLobSupport ()) { @@ -2063,6 +2116,7 @@ public void Var093 () /** getBigDecimal() with 2 parameters - Get from a DISTINCT. **/ + @SuppressWarnings("deprecation") public void Var094 () { if (checkLobSupport ()) { @@ -2105,6 +2159,7 @@ public void Var095 () /** getBigDecimal() with 2 parameters - Get from a BIGINT, scale = 0. **/ + @SuppressWarnings("deprecation") public void Var096 () { if (checkBigintSupport ()) { @@ -2126,6 +2181,7 @@ public void Var096 () /** getBigDecimal() with 2 parameters - Get from a BIGINT, scale = 3. **/ + @SuppressWarnings("deprecation") public void Var097 () { if (checkBigintSupport ()) { diff --git a/src/test/JD/RS/JDRSGetBinaryStream.java b/src/test/JD/RS/JDRSGetBinaryStream.java index 835ffb2..65101e7 100644 --- a/src/test/JD/RS/JDRSGetBinaryStream.java +++ b/src/test/JD/RS/JDRSGetBinaryStream.java @@ -30,6 +30,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -82,7 +83,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetBinaryStream (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetBlob.java b/src/test/JD/RS/JDRSGetBlob.java index a18edc0..61329db 100644 --- a/src/test/JD/RS/JDRSGetBlob.java +++ b/src/test/JD/RS/JDRSGetBlob.java @@ -29,6 +29,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -77,7 +78,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetBlob (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetBoolean.java b/src/test/JD/RS/JDRSGetBoolean.java index faf5e68..c100ad6 100644 --- a/src/test/JD/RS/JDRSGetBoolean.java +++ b/src/test/JD/RS/JDRSGetBoolean.java @@ -30,6 +30,7 @@ import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -70,7 +71,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetBoolean (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetByte.java b/src/test/JD/RS/JDRSGetByte.java index 9836937..883a835 100644 --- a/src/test/JD/RS/JDRSGetByte.java +++ b/src/test/JD/RS/JDRSGetByte.java @@ -25,6 +25,7 @@ import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -57,7 +58,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetByte (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetBytes.java b/src/test/JD/RS/JDRSGetBytes.java index 5775361..e38348f 100644 --- a/src/test/JD/RS/JDRSGetBytes.java +++ b/src/test/JD/RS/JDRSGetBytes.java @@ -22,6 +22,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; import com.ibm.as400.access.AS400; @@ -66,7 +67,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetBytes(AS400 systemObject, Hashtable namesAndVars, int runMode, + public JDRSGetBytes(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetBytes", namesAndVars, runMode, fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetBytesBinary.java b/src/test/JD/RS/JDRSGetBytesBinary.java index 9759490..f2e6857 100644 --- a/src/test/JD/RS/JDRSGetBytesBinary.java +++ b/src/test/JD/RS/JDRSGetBytesBinary.java @@ -21,13 +21,13 @@ import test.JDTestcase; import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -76,7 +76,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetBytesBinary (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -164,7 +164,7 @@ public void Var001 () + JDRSTest.RSTEST_BINARY); JDRSTest.position0 (rs, "BINARY_NOTRANS"); byte[] v = rs.getBytes (4); - assertCondition (isEqual (v, twelve), "New testcase added by Native"); + assertCondition (areEqual (v, twelve), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } @@ -185,7 +185,7 @@ public void Var002 () + JDRSTest.RSTEST_BINARY); JDRSTest.position0 (rs, "BINARY_NOTRANS"); byte[] v = rs.getBytes ("C_BINARY_20"); - assertCondition (isEqual (v, eleven), "New testcase added by Native"); + assertCondition (areEqual (v, eleven), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } @@ -209,7 +209,7 @@ public void Var003 () (byte) 0xAB, (byte) 0xBC}; rs_.updateBytes ("C_VARBINARY_20", test); byte[] v = rs_.getBytes ("C_VARBINARY_20"); - assertCondition (isEqual (v, test), "New testcase added by Native"); + assertCondition (areEqual (v, test), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } @@ -238,7 +238,7 @@ public void Var004 () rs_.updateBytes ("C_BINARY_20", test); rs_.updateRow (); byte[] v = rs_.getBytes ("C_BINARY_20"); - assertCondition (isEqual (v, test), "New testcase added by Native"); + assertCondition (areEqual (v, test), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } @@ -267,7 +267,7 @@ public void Var005 () byte[] test = new byte[] { (byte) 0xBC, (byte) 0xCD}; rs_.updateBytes ("C_VARBINARY_20", test); byte[] v = rs_.getBytes ("C_VARBINARY_20"); - assertCondition (isEqual (v, test), "New testcase added by Native"); + assertCondition (areEqual (v, test), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } @@ -299,7 +299,7 @@ public void Var006 () rs_.updateBytes ("C_VARBINARY_20", test); rs_.insertRow (); byte[] v = rs_.getBytes ("C_VARBINARY_20"); - assertCondition (isEqual (v, test), "New testcase added by Native"); + assertCondition (areEqual (v, test), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } @@ -345,7 +345,7 @@ public void Var008 () + JDRSTest.RSTEST_BINARY); JDRSTest.position0 (rs, "BINARY_NOTRANS"); byte[] v = rs.getBytes ("C_BINARY_20"); - assertCondition (isEqual (v, eleven), "New testcase added by Native"); + assertCondition (areEqual (v, eleven), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } @@ -368,7 +368,7 @@ public void Var009 () + JDRSTest.RSTEST_BINARY); JDRSTest.position0 (rs, "BINARY_NOTRANS"); byte[] v = rs.getBytes ("C_VARBINARY_20"); - assertCondition (isEqual (v, twelve), "New testcase added by Native"); + assertCondition (areEqual (v, twelve), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } @@ -401,7 +401,7 @@ public void Var010 () byte[] expected = { (byte) 'E', (byte) 'l', (byte) 'e', (byte) 'v', (byte) 'e', (byte) 'n', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' '}; - assertCondition ((isEqual (v, expected)) && (w == null), "New testcase added by Native"); + assertCondition ((areEqual (v, expected)) && (w == null), "New testcase added by Native"); } catch (Exception e) { failed (e, "Unexpected Exception - New testcase added by Native"); } diff --git a/src/test/JD/RS/JDRSGetCharacterStream.java b/src/test/JD/RS/JDRSGetCharacterStream.java index b5c5700..bbcc9c9 100644 --- a/src/test/JD/RS/JDRSGetCharacterStream.java +++ b/src/test/JD/RS/JDRSGetCharacterStream.java @@ -32,6 +32,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; /** * Testcase JDRSGetCharacterStream. This tests the following method of the JDBC @@ -65,7 +66,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetCharacterStream(AS400 systemObject, Hashtable namesAndVars, + public JDRSGetCharacterStream(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetCharacterStream", namesAndVars, runMode, @@ -73,7 +74,7 @@ public JDRSGetCharacterStream(AS400 systemObject, Hashtable namesAndVars, } public JDRSGetCharacterStream(AS400 systemObject, String testcaseName, - Hashtable namesAndVars, int runMode, FileOutputStream fileOutputStream, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, testcaseName, namesAndVars, runMode, fileOutputStream, password); diff --git a/src/test/JD/RS/JDRSGetClob.java b/src/test/JD/RS/JDRSGetClob.java index 8f20932..b36d8a0 100644 --- a/src/test/JD/RS/JDRSGetClob.java +++ b/src/test/JD/RS/JDRSGetClob.java @@ -32,6 +32,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; /** * Testcase JDRSGetClob. This tests the following method of the JDBC ResultSet @@ -64,7 +65,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetClob(AS400 systemObject, Hashtable namesAndVars, int runMode, + public JDRSGetClob(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetClob", namesAndVars, runMode, fileOutputStream, @@ -75,7 +76,7 @@ public JDRSGetClob(AS400 systemObject, Hashtable namesAndVars, int runMode, * Constructor. **/ public JDRSGetClob(AS400 systemObject, String testcaseName, - Hashtable namesAndVars, int runMode, FileOutputStream fileOutputStream, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, testcaseName, namesAndVars, runMode, fileOutputStream, password); diff --git a/src/test/JD/RS/JDRSGetDate.java b/src/test/JD/RS/JDRSGetDate.java index 0a56986..45f1d24 100644 --- a/src/test/JD/RS/JDRSGetDate.java +++ b/src/test/JD/RS/JDRSGetDate.java @@ -32,6 +32,7 @@ import java.util.Calendar; import java.util.Hashtable; import java.util.TimeZone; +import java.util.Vector; import java.util.GregorianCalendar; @@ -74,7 +75,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetDate (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetDouble.java b/src/test/JD/RS/JDRSGetDouble.java index 6fbe994..027722b 100644 --- a/src/test/JD/RS/JDRSGetDouble.java +++ b/src/test/JD/RS/JDRSGetDouble.java @@ -24,6 +24,7 @@ import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -61,7 +62,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetDouble (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetFloat.java b/src/test/JD/RS/JDRSGetFloat.java index 2e5bac8..c965178 100644 --- a/src/test/JD/RS/JDRSGetFloat.java +++ b/src/test/JD/RS/JDRSGetFloat.java @@ -26,6 +26,7 @@ import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -65,7 +66,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetFloat (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetInt.java b/src/test/JD/RS/JDRSGetInt.java index 78aed76..c66ff11 100644 --- a/src/test/JD/RS/JDRSGetInt.java +++ b/src/test/JD/RS/JDRSGetInt.java @@ -24,6 +24,7 @@ import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -53,7 +54,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetInt (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetLong.java b/src/test/JD/RS/JDRSGetLong.java index c0e83c6..cb8d224 100644 --- a/src/test/JD/RS/JDRSGetLong.java +++ b/src/test/JD/RS/JDRSGetLong.java @@ -23,6 +23,7 @@ import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; @@ -53,7 +54,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetLong (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetNCharacterStream.java b/src/test/JD/RS/JDRSGetNCharacterStream.java index ddcc73b..82396b3 100644 --- a/src/test/JD/RS/JDRSGetNCharacterStream.java +++ b/src/test/JD/RS/JDRSGetNCharacterStream.java @@ -20,6 +20,7 @@ import java.io.FileOutputStream; import java.util.Hashtable; +import java.util.Vector; @@ -53,7 +54,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetNCharacterStream (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetNClob.java b/src/test/JD/RS/JDRSGetNClob.java index 7ddc455..095dbc1 100644 --- a/src/test/JD/RS/JDRSGetNClob.java +++ b/src/test/JD/RS/JDRSGetNClob.java @@ -21,6 +21,7 @@ import java.io.FileOutputStream; import java.util.Hashtable; +import java.util.Vector; @@ -53,7 +54,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetNClob (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetNString.java b/src/test/JD/RS/JDRSGetNString.java index 4a4d2a3..1f0d821 100644 --- a/src/test/JD/RS/JDRSGetNString.java +++ b/src/test/JD/RS/JDRSGetNString.java @@ -31,6 +31,7 @@ import java.sql.Statement; import java.sql.PreparedStatement; import java.util.Hashtable; +import java.util.Vector; @@ -72,7 +73,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetNString (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetObject.java b/src/test/JD/RS/JDRSGetObject.java index a23f322..bcf08ad 100644 --- a/src/test/JD/RS/JDRSGetObject.java +++ b/src/test/JD/RS/JDRSGetObject.java @@ -32,8 +32,9 @@ import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; -import java.util.Hashtable; -import java.util.Map; +import java.util.Hashtable; +import java.util.Map; +import java.util.Vector; @@ -80,7 +81,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetObject (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -274,7 +275,7 @@ public void Var007() ResultSet rs = statement0_.executeQuery ("SELECT * FROM " + JDRSTest.RSTEST_GET); JDRSTest.position0 (rs, "DATE_2000"); - Object s = rs.getObject (1, (Map) null); + Object s = rs.getObject (1, (Map>) null); failed ("Didn't throw SQLException"+s); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); @@ -398,7 +399,7 @@ public void Var013() if (checkJdbc20 ()) { try { rs_ = JDRSTest.position (driver_, statement_, statementQuery_, rs_, "DATE_2000"); - Object s = rs_.getObject ("C_KEY", (Map) null); + Object s = rs_.getObject ("C_KEY", (Map>) null); failed ("Didn't throw SQLException"+s); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); @@ -1154,7 +1155,7 @@ public void Var045() { + JDRSTest.RSTEST_GETXML); rs.next(); Object s = rs.getObject("C_XML"); - Class c = s.getClass(); + Class c = s.getClass(); boolean passed = Class.forName("java.sql.SQLXML").isInstance(s); StringBuffer sb = new StringBuffer(); @@ -1165,7 +1166,7 @@ public void Var045() { // Ignore class not found exception } if (!passed) { - Class interfaces[] = c.getInterfaces(); + Class interfaces[] = c.getInterfaces(); sb.append("There are " + interfaces.length + " interfaces"); for (int i = 0; i < interfaces.length; i++) { sb.append("\nImplements " + interfaces[i]); diff --git a/src/test/JD/RS/JDRSGetObject41.java b/src/test/JD/RS/JDRSGetObject41.java index b4b3441..3fd5d08 100644 --- a/src/test/JD/RS/JDRSGetObject41.java +++ b/src/test/JD/RS/JDRSGetObject41.java @@ -20,7 +20,6 @@ import test.JDReflectionUtil; import test.JDTestDriver; import test.JDTestcase; -import test.JVMInfo; import java.io.FileOutputStream; import java.io.InputStream; @@ -31,7 +30,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -64,14 +63,14 @@ public static void main(String args[]) throws Exception { private Statement statement_; private ResultSet rs_; - private Hashtable foundExceptions_; + private Hashtable foundExceptions_; /** Constructor. **/ public JDRSGetObject41 (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -385,15 +384,15 @@ public void testGetObject(String[] testSpec) { String query = testSpec[1]; int columnCount = testSpec.length - 2; sb.append("Testing class "+className+"\n"); - Class lookupClass = Class.forName(className); + Class lookupClass = Class.forName(className); - Class xmlClass = null; + Class xmlClass = null; try { xmlClass = Class.forName("java.sql.SQLXML"); } catch (Exception e) { } - Class rowidClass = null; + Class rowidClass = null; try { rowidClass = Class.forName("java.sql.RowId"); } catch (Exception e) { @@ -409,7 +408,7 @@ public void testGetObject(String[] testSpec) { Object o = JDReflectionUtil.callMethod_O(rs, "getObject", i, lookupClass); String objectString; String objectClassName; - Class objectClass = null; + Class objectClass = null; if (o == null) { objectString="null"; objectClass = lookupClass; @@ -480,7 +479,7 @@ public void testGetObject(String[] testSpec) { } if (foundExceptions_ == null) { - foundExceptions_ = new Hashtable(); + foundExceptions_ = new Hashtable(); } if (foundExceptions_.get(checkException) == null) { foundExceptions_.put(checkException, checkException); @@ -4055,12 +4054,7 @@ public void Var220() "null"}; - String[] testArrayClob = { - "java.lang.Object", - "select XMLPARSE( DOCUMENT 'hello' ), CAST(null as XML) from sysibm.sysdummy1", - "CLOB=hello", - "null"}; - + testGetObject(testArray); } @@ -4202,20 +4196,6 @@ public void Var229() "null", "null", "null"}; - - String[] testArray15 = { - "java.lang.Object", - "select CAST(CAST(X'1122' AS CHAR(2) FOR BIT DATA) AS ROWID), CAST('ABC' as NCHAR(10)), CAST('ABC' AS NVARCHAR(100)), CAST('ABC' AS NCLOB(100K)), CAST(null AS ROWID), CAST(null as NCHAR(10)), CAST(null AS NVARCHAR(100)), CAST(null AS NCLOB(100K)) from sysibm.sysdummy1", - "BYTEARRAY=1122", - "ABC ", - "ABC", - "CLOB=ABC", - "null", - "null", - "null", - "null"}; - - testGetObject(testArray); } @@ -4924,15 +4904,15 @@ public void testGetObjectNamed(String[] testSpec) { String query = testSpec[1]; int columnCount = testSpec.length - 2; sb.append("Testing class "+className+"\n"); - Class lookupClass = Class.forName(className); + Class lookupClass = Class.forName(className); - Class xmlClass = null; + Class xmlClass = null; try { xmlClass = Class.forName("java.sql.SQLXML"); } catch (Exception e) { } - Class rowidClass = null; + Class rowidClass = null; try { rowidClass = Class.forName("java.sql.RowId"); } catch (Exception e) { @@ -4950,7 +4930,7 @@ public void testGetObjectNamed(String[] testSpec) { Object o = JDReflectionUtil.callMethod_O(rs, "getObject", columnName, lookupClass); String objectString; String objectClassName; - Class objectClass = null; + Class objectClass = null; if (o == null) { objectString="null"; objectClass = lookupClass; @@ -5021,7 +5001,7 @@ public void testGetObjectNamed(String[] testSpec) { } if (foundExceptions_ == null) { - foundExceptions_ = new Hashtable(); + foundExceptions_ = new Hashtable(); } if (foundExceptions_.get(checkException) == null) { foundExceptions_.put(checkException, checkException); diff --git a/src/test/JD/RS/JDRSGetObjectUDT.java b/src/test/JD/RS/JDRSGetObjectUDT.java index b8a69f7..b388102 100644 --- a/src/test/JD/RS/JDRSGetObjectUDT.java +++ b/src/test/JD/RS/JDRSGetObjectUDT.java @@ -24,7 +24,6 @@ import java.math.BigDecimal; import java.sql.Blob; import java.sql.Clob; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.Date; @@ -34,7 +33,8 @@ import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; -import java.util.Hashtable; +import java.util.HashMap; +import java.util.Hashtable; import java.util.Vector; import java.util.Map; @@ -65,14 +65,14 @@ public class JDRSGetObjectUDT private Statement statement_; private Statement statement0_; private ResultSet rs_; - java.util.Map map_; + java.util.Map> map_; private boolean canRun = false; /** Constructor. **/ public JDRSGetObjectUDT (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -302,7 +302,7 @@ public void Var007() ResultSet rs = statement0_.executeQuery ("SELECT * FROM " + JDRSTest.RSTEST_GET); JDRSTest.position0 (rs, "DATE_2000"); - Object s = rs.getObject (1, (Map) null); + Object s = rs.getObject (1, (Map>) null); failed ("Didn't throw SQLException s="+s); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); @@ -326,7 +326,7 @@ public void Var008() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, "DATE_2000"); - Object s = rs_.getObject (1, new Hashtable ()); + Object s = rs_.getObject (1, new HashMap> ()); assertCondition (s.equals ("DATE_2000")); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -441,7 +441,7 @@ public void Var013() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, "DATE_2000"); - Object s = rs_.getObject ("C_KEY", (Map) null); + Object s = rs_.getObject ("C_KEY", (Map>) null); failed ("Didn't throw SQLException s="+s); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); @@ -462,7 +462,7 @@ public void Var014() try { JDRSTest.position (rs_, "DATE_2000"); - Object s = rs_.getObject ("C_KEY", new Hashtable ()); + Object s = rs_.getObject ("C_KEY", new Hashtable> ()); assertCondition (s.equals ("DATE_2000")); diff --git a/src/test/JD/RS/JDRSGetRef.java b/src/test/JD/RS/JDRSGetRef.java index 7b818b8..4f4984e 100644 --- a/src/test/JD/RS/JDRSGetRef.java +++ b/src/test/JD/RS/JDRSGetRef.java @@ -26,7 +26,7 @@ import java.sql.ResultSet; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -63,7 +63,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetRef (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRow.java b/src/test/JD/RS/JDRSGetRow.java index b3f7db0..491c9c7 100644 --- a/src/test/JD/RS/JDRSGetRow.java +++ b/src/test/JD/RS/JDRSGetRow.java @@ -21,12 +21,11 @@ import test.JDTestcase; import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -63,7 +62,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetRow (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRowId.java b/src/test/JD/RS/JDRSGetRowId.java index 2a2ccef..b325d1d 100644 --- a/src/test/JD/RS/JDRSGetRowId.java +++ b/src/test/JD/RS/JDRSGetRowId.java @@ -19,7 +19,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; import com.ibm.as400.access.AS400; @@ -55,7 +55,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetRowId(AS400 systemObject, Hashtable namesAndVars, int runMode, + public JDRSGetRowId(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetRowId", namesAndVars, runMode, fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRowTest.java b/src/test/JD/RS/JDRSGetRowTest.java index 550e961..4881d96 100644 --- a/src/test/JD/RS/JDRSGetRowTest.java +++ b/src/test/JD/RS/JDRSGetRowTest.java @@ -41,7 +41,6 @@ public class JDRSGetRowTest /** * */ - private static final long serialVersionUID = 1L; Connection connection_; // Constants. public static String COLLECTION = "JDTESTRS"; @@ -102,7 +101,6 @@ public JDRSGetRowTest (String[] args) public void setup () throws Exception { - boolean tableCreated; super.setup(); // @D2A if (connection_ != null) connection_.close(); diff --git a/src/test/JD/RS/JDRSGetRow_Absolute.java b/src/test/JD/RS/JDRSGetRow_Absolute.java index 6eb3973..c4d1cb2 100644 --- a/src/test/JD/RS/JDRSGetRow_Absolute.java +++ b/src/test/JD/RS/JDRSGetRow_Absolute.java @@ -23,7 +23,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -61,7 +61,7 @@ public class JDRSGetRow_Absolute Constructor. **/ public JDRSGetRow_Absolute (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRow_AfterLast.java b/src/test/JD/RS/JDRSGetRow_AfterLast.java index 47fcd0a..eb30e09 100644 --- a/src/test/JD/RS/JDRSGetRow_AfterLast.java +++ b/src/test/JD/RS/JDRSGetRow_AfterLast.java @@ -23,7 +23,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -61,7 +61,7 @@ public class JDRSGetRow_AfterLast Constructor. **/ public JDRSGetRow_AfterLast (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRow_BeforeFirst.java b/src/test/JD/RS/JDRSGetRow_BeforeFirst.java index f407606..fc8f356 100644 --- a/src/test/JD/RS/JDRSGetRow_BeforeFirst.java +++ b/src/test/JD/RS/JDRSGetRow_BeforeFirst.java @@ -23,7 +23,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -61,7 +61,7 @@ public class JDRSGetRow_BeforeFirst Constructor. **/ public JDRSGetRow_BeforeFirst (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRow_First.java b/src/test/JD/RS/JDRSGetRow_First.java index 967a077..81b56f1 100644 --- a/src/test/JD/RS/JDRSGetRow_First.java +++ b/src/test/JD/RS/JDRSGetRow_First.java @@ -23,7 +23,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -61,7 +61,7 @@ public class JDRSGetRow_First Constructor. **/ public JDRSGetRow_First (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRow_Last.java b/src/test/JD/RS/JDRSGetRow_Last.java index 2ec9110..0b350fc 100644 --- a/src/test/JD/RS/JDRSGetRow_Last.java +++ b/src/test/JD/RS/JDRSGetRow_Last.java @@ -23,7 +23,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -61,7 +61,7 @@ public class JDRSGetRow_Last Constructor. **/ public JDRSGetRow_Last (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRow_Previous.java b/src/test/JD/RS/JDRSGetRow_Previous.java index 124c981..0bf871c 100644 --- a/src/test/JD/RS/JDRSGetRow_Previous.java +++ b/src/test/JD/RS/JDRSGetRow_Previous.java @@ -23,7 +23,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -61,7 +61,7 @@ public class JDRSGetRow_Previous Constructor. **/ public JDRSGetRow_Previous (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetRow_Relative.java b/src/test/JD/RS/JDRSGetRow_Relative.java index 9e0eabc..d9e92cd 100644 --- a/src/test/JD/RS/JDRSGetRow_Relative.java +++ b/src/test/JD/RS/JDRSGetRow_Relative.java @@ -23,7 +23,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -61,7 +61,7 @@ public class JDRSGetRow_Relative Constructor. **/ public JDRSGetRow_Relative (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetSQLXML.java b/src/test/JD/RS/JDRSGetSQLXML.java index 3d4e678..686546b 100644 --- a/src/test/JD/RS/JDRSGetSQLXML.java +++ b/src/test/JD/RS/JDRSGetSQLXML.java @@ -33,7 +33,7 @@ import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** * Testcase JDRSGetSQLXML. This tests the following method of the JDBC ResultSet @@ -66,7 +66,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetSQLXML(AS400 systemObject, Hashtable namesAndVars, int runMode, + public JDRSGetSQLXML(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetSQLXML", namesAndVars, runMode, diff --git a/src/test/JD/RS/JDRSGetShort.java b/src/test/JD/RS/JDRSGetShort.java index f844d7b..c6e14f5 100644 --- a/src/test/JD/RS/JDRSGetShort.java +++ b/src/test/JD/RS/JDRSGetShort.java @@ -22,7 +22,7 @@ import java.io.FileOutputStream; import java.sql.ResultSet; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -55,7 +55,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetShort (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetString.java b/src/test/JD/RS/JDRSGetString.java index 7151304..2cb01ad 100644 --- a/src/test/JD/RS/JDRSGetString.java +++ b/src/test/JD/RS/JDRSGetString.java @@ -19,7 +19,6 @@ import test.JDRSTest; import test.JDTestDriver; import test.JDTestcase; -import test.JTOpenTestEnvironment; import test.JD.JDTestUtilities; import java.io.FileOutputStream; @@ -31,7 +30,7 @@ import java.sql.SQLWarning; import java.sql.Statement; import java.sql.PreparedStatement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -75,7 +74,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSGetString (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -2637,7 +2636,6 @@ public void Var083 () int expectedOffset=1; - String vmName = System.getProperty("java.vm.name"); if (getDriver() == JDTestDriver.DRIVER_NATIVE) { if (getRelease() >= JDTestDriver.RELEASE_V7R4M0) { expectedOffset=1; diff --git a/src/test/JD/RS/JDRSGetStringBIDI.java b/src/test/JD/RS/JDRSGetStringBIDI.java index f412bfb..00f4b62 100644 --- a/src/test/JD/RS/JDRSGetStringBIDI.java +++ b/src/test/JD/RS/JDRSGetStringBIDI.java @@ -16,10 +16,9 @@ import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; import com.ibm.as400.access.AS400; @@ -49,12 +48,12 @@ public static void main(String args[]) throws Exception { // Private data. private String properties_ = "NOTSET"; - private static String table_ = JDRSTest.COLLECTION + ".JDRSGSBIDI"; + // private static String table_ = JDRSTest.COLLECTION + ".JDRSGSBIDI"; /** * Constructor. **/ - public JDRSGetStringBIDI(AS400 systemObject, Hashtable namesAndVars, + public JDRSGetStringBIDI(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetStringBIDI", namesAndVars, runMode, @@ -69,7 +68,7 @@ public JDRSGetStringBIDI(AS400 systemObject, Hashtable namesAndVars, **/ protected void setup() throws Exception { reconnect(""); - table_ = JDRSTest.COLLECTION + ".JDRSGSBIDI"; + // table_ = JDRSTest.COLLECTION + ".JDRSGSBIDI"; } /** diff --git a/src/test/JD/RS/JDRSGetStringMixed.java b/src/test/JD/RS/JDRSGetStringMixed.java index e1a8808..fa12bb1 100644 --- a/src/test/JD/RS/JDRSGetStringMixed.java +++ b/src/test/JD/RS/JDRSGetStringMixed.java @@ -16,10 +16,9 @@ import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; import com.ibm.as400.access.AS400; @@ -49,12 +48,12 @@ public static void main(String args[]) throws Exception { // Private data. private String properties_ = "NOTSET"; - private static String table_ = JDRSTest.COLLECTION + ".JDRSGSUNSP"; + // private static String table_ = JDRSTest.COLLECTION + ".JDRSGSUNSP"; /** * Constructor. **/ - public JDRSGetStringMixed(AS400 systemObject, Hashtable namesAndVars, + public JDRSGetStringMixed(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetStringMixed", namesAndVars, runMode, @@ -69,7 +68,7 @@ public JDRSGetStringMixed(AS400 systemObject, Hashtable namesAndVars, **/ protected void setup() throws Exception { reconnect("errors=full"); - table_ = JDRSTest.COLLECTION + ".JDRSGSUNSP"; + // table_ = JDRSTest.COLLECTION + ".JDRSGSUNSP"; } /** diff --git a/src/test/JD/RS/JDRSGetStringUnsupported.java b/src/test/JD/RS/JDRSGetStringUnsupported.java index e737952..4c86430 100644 --- a/src/test/JD/RS/JDRSGetStringUnsupported.java +++ b/src/test/JD/RS/JDRSGetStringUnsupported.java @@ -15,10 +15,9 @@ import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; import com.ibm.as400.access.AS400; @@ -48,12 +47,12 @@ public static void main(String args[]) throws Exception { // Private data. private String properties_ = "NOTSET"; - private static String table_ = JDRSTest.COLLECTION + ".JDRSGSUNSP"; + // private static String table_ = JDRSTest.COLLECTION + ".JDRSGSUNSP"; /** * Constructor. **/ - public JDRSGetStringUnsupported(AS400 systemObject, Hashtable namesAndVars, + public JDRSGetStringUnsupported(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetStringUnsupported", namesAndVars, runMode, @@ -68,7 +67,7 @@ public JDRSGetStringUnsupported(AS400 systemObject, Hashtable namesAndVars, **/ protected void setup() throws Exception { reconnect("errors=full"); - table_ = JDRSTest.COLLECTION + ".JDRSGSUNSP"; + // table_ = JDRSTest.COLLECTION + ".JDRSGSUNSP"; } /** diff --git a/src/test/JD/RS/JDRSGetTime.java b/src/test/JD/RS/JDRSGetTime.java index 4672464..0faa7c3 100644 --- a/src/test/JD/RS/JDRSGetTime.java +++ b/src/test/JD/RS/JDRSGetTime.java @@ -28,7 +28,7 @@ import java.sql.Time; import java.util.Calendar; import java.util.GregorianCalendar; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; import java.util.TimeZone; /** @@ -60,7 +60,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetTime(AS400 systemObject, Hashtable namesAndVars, int runMode, + public JDRSGetTime(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetTime", namesAndVars, runMode, fileOutputStream, @@ -419,6 +419,7 @@ public void Var017() { * For now, we just take the defaults and expect the calendar to be ignored in * our testing. **/ + @SuppressWarnings("deprecation") public void Var018() { Calendar c = new GregorianCalendar(); c.getTimeZone(); diff --git a/src/test/JD/RS/JDRSGetTimestamp.java b/src/test/JD/RS/JDRSGetTimestamp.java index 2ef5190..7be4936 100644 --- a/src/test/JD/RS/JDRSGetTimestamp.java +++ b/src/test/JD/RS/JDRSGetTimestamp.java @@ -31,7 +31,7 @@ import java.sql.Timestamp; import java.util.Calendar; import java.util.GregorianCalendar; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; import java.util.TimeZone; /** @@ -64,7 +64,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetTimestamp(AS400 systemObject, Hashtable namesAndVars, + public JDRSGetTimestamp(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetTimestamp", namesAndVars, runMode, @@ -428,6 +428,7 @@ public void Var017() { * For now, we just take the defaults and expect the calendar to be ignored in * our testing. **/ + @SuppressWarnings("deprecation") public void Var018() { if (checkJdbc20()) { try { @@ -1095,6 +1096,7 @@ public void Var058() { * Timestamp unit tests */ + @SuppressWarnings("unlikely-arg-type") public void Var059() { if (checkTimestamp12Support()) { StringBuffer sb = new StringBuffer(); @@ -1523,7 +1525,7 @@ public void Var059() { } total++; - Class[] argTypes = new Class[1]; + Class[] argTypes = new Class[1]; argTypes[0] = Class.forName("java.lang.Object"); Object[] args = new Object[1]; args[0] = ts2; diff --git a/src/test/JD/RS/JDRSGetURL.java b/src/test/JD/RS/JDRSGetURL.java index e60425f..91d0d1b 100644 --- a/src/test/JD/RS/JDRSGetURL.java +++ b/src/test/JD/RS/JDRSGetURL.java @@ -22,11 +22,10 @@ import test.JDTestcase; import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; import java.net.URL; /** @@ -56,7 +55,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetURL(AS400 systemObject, Hashtable namesAndVars, int runMode, + public JDRSGetURL(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetURL", namesAndVars, runMode, fileOutputStream, diff --git a/src/test/JD/RS/JDRSGetUnicodeStream.java b/src/test/JD/RS/JDRSGetUnicodeStream.java index 22bcf69..5abebf3 100644 --- a/src/test/JD/RS/JDRSGetUnicodeStream.java +++ b/src/test/JD/RS/JDRSGetUnicodeStream.java @@ -30,7 +30,7 @@ import java.sql.SQLWarning; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** * Testcase JDRSGetUnicodeStream. This tests the following method of the JDBC @@ -71,7 +71,7 @@ public static void main(String args[]) throws Exception { /** * Constructor. **/ - public JDRSGetUnicodeStream(AS400 systemObject, Hashtable namesAndVars, + public JDRSGetUnicodeStream(AS400 systemObject, Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, String password) { super(systemObject, "JDRSGetUnicodeStream", namesAndVars, runMode, @@ -166,6 +166,7 @@ protected static boolean compareBeginsWithBytes(InputStream i, byte[] b, StringB /** * getUnicodeStream() - Should throw exception when the result set is closed. **/ + @SuppressWarnings("deprecation") public void Var001() { try { Statement s = connection_.createStatement(); @@ -183,6 +184,7 @@ public void Var001() { * getUnicodeStream() - Should throw exception when cursor is not pointing to * a row. **/ + @SuppressWarnings("deprecation") public void Var002() { try { ResultSet rs = statement0_.executeQuery("SELECT * FROM " @@ -198,6 +200,7 @@ public void Var002() { * getUnicodeStream() - Should throw an exception when the column is an * invalid index. **/ + @SuppressWarnings("deprecation") public void Var003() { try { ResultSet rs = statement0_.executeQuery("SELECT * FROM " @@ -213,6 +216,7 @@ public void Var003() { /** * getUnicodeStream() - Should throw an exception when the column is 0. **/ + @SuppressWarnings("deprecation") public void Var004() { try { ResultSet rs = statement0_.executeQuery("SELECT * FROM " @@ -228,6 +232,7 @@ public void Var004() { /** * getUnicodeStream() - Should throw an exception when the column is -1. **/ + @SuppressWarnings("deprecation") public void Var005() { try { ResultSet rs = statement0_.executeQuery("SELECT * FROM " @@ -243,6 +248,7 @@ public void Var005() { /** * getUnicodeStream() - Should work when the column index is valid. **/ + @SuppressWarnings("deprecation") public void Var006() { try { sb.setLength(0); @@ -269,6 +275,7 @@ public void Var006() { * getUnicodeStream() - Should throw an exception when the column name is * null. **/ + @SuppressWarnings("deprecation") public void Var007() { if (getDriver() == JDTestDriver.DRIVER_JCC) { notApplicable("JCC throws null pointer exception when column name is null "); @@ -290,6 +297,7 @@ public void Var007() { * getUnicodeStream() - Should throw an exception when the column name is an * empty string. **/ + @SuppressWarnings("deprecation") public void Var008() { try { ResultSet rs = statement0_.executeQuery("SELECT * FROM " @@ -306,6 +314,7 @@ public void Var008() { * getUnicodeStream() - Should throw an exception when the column name is * invalid. **/ + @SuppressWarnings("deprecation") public void Var009() { try { ResultSet rs = statement0_.executeQuery("SELECT * FROM " @@ -322,7 +331,8 @@ public void Var009() { * getUnicodeStream() - Should throw an exception when the column name is * valid. **/ - public void Var010() { + @SuppressWarnings("deprecation") + public void Var010() { sb.setLength(0); try { @@ -348,7 +358,8 @@ public void Var010() { /** * getUnicodeStream() - Should work when an update is pending. **/ - public void Var011() { + @SuppressWarnings("deprecation") + public void Var011() { sb.setLength(0); if (checkJdbc20()) { @@ -372,7 +383,8 @@ public void Var011() { /** * getUnicodeStream() - Should work when an update has been done. **/ - public void Var012() { + @SuppressWarnings("deprecation") + public void Var012() { if (checkJdbc20()) { sb.setLength(0); @@ -401,7 +413,8 @@ public void Var012() { * getUnicodeStream() - Should work when the current row is the insert row, * when an insert is pending. **/ - public void Var013() { + @SuppressWarnings("deprecation") + public void Var013() { if (checkJdbc20()) { if (getDriver() == JDTestDriver.DRIVER_JCC) { notApplicable("JCC does not support moveToInserRow"); @@ -430,6 +443,7 @@ public void Var013() { * getUnicodeStream() - Should work when the current row is the insert row, * when an insert has been done. **/ + @SuppressWarnings("deprecation") public void Var014() { if (checkJdbc20()) { if (getDriver() == JDTestDriver.DRIVER_JCC) { @@ -459,6 +473,7 @@ public void Var014() { /** * getUnicodeStream() - Should throw an exception on a deleted row. **/ + @SuppressWarnings("deprecation") public void Var015() { if (checkJdbc20()) { if (getDriver() == JDTestDriver.DRIVER_JCC) { @@ -479,6 +494,7 @@ public void Var015() { /** * getUnicodeStream() - Should return null when the column is NULL. **/ + @SuppressWarnings("deprecation") public void Var016() { try { ResultSet rs = statement0_.executeQuery("SELECT * FROM " @@ -495,7 +511,8 @@ public void Var016() { /** * getUnicodeStream() - Get from a SMALLINT. **/ - public void Var017() { + @SuppressWarnings("deprecation") + public void Var017() { sb.setLength(0); try { ResultSet rs = statement0_.executeQuery("SELECT * FROM " @@ -516,7 +533,8 @@ public void Var017() { /** * getUnicodeStream() - Get from a INTEGER. **/ - public void Var018() { + @SuppressWarnings("deprecation") + public void Var018() { sb.setLength(0); try { @@ -539,6 +557,7 @@ public void Var018() { /** * getUnicodeStream() - Get from a REAL. **/ + @SuppressWarnings("deprecation") public void Var019() { sb.setLength(0); try { @@ -558,6 +577,7 @@ public void Var019() { /** * getUnicodeStream() - Get from a FLOAT. **/ + @SuppressWarnings("deprecation") public void Var020() { sb.setLength(0); try { @@ -579,6 +599,7 @@ public void Var020() { /** * getUnicodeStream() - Get from a DOUBLE. **/ + @SuppressWarnings("deprecation") public void Var021() { sb.setLength(0); try { @@ -598,7 +619,8 @@ public void Var021() { /** * getUnicodeStream() - Get from a DECIMAL. **/ - public void Var022() { + @SuppressWarnings("deprecation") + public void Var022() { sb.setLength(0); sb.append(" -- getUnicodeStream from decimal -- updated 12/14/2011"); try { @@ -616,7 +638,8 @@ public void Var022() { /** * getUnicodeStream() - Get from a NUMERIC. **/ - public void Var023() { + @SuppressWarnings("deprecation") + public void Var023() { sb.setLength(0); sb.append(" -- getUnicodeStream from numeric -- updated 12/14/2011"); @@ -635,7 +658,8 @@ public void Var023() { /** * getUnicodeStream() - Get from an empty CHAR. **/ - public void Var024() { + @SuppressWarnings("deprecation") + public void Var024() { sb.setLength(0); try { @@ -661,7 +685,8 @@ public void Var024() { /** * getUnicodeStream() - Get from a full CHAR. **/ - public void Var025() { + @SuppressWarnings("deprecation") + public void Var025() { sb.setLength(0); try { @@ -687,6 +712,7 @@ public void Var025() { /** * getUnicodeStream() - Get from an empty VARCHAR. **/ + @SuppressWarnings("deprecation") public void Var026() { sb.setLength(0); @@ -710,6 +736,7 @@ public void Var026() { /** * getUnicodeStream() - Get from a full VARCHAR. **/ + @SuppressWarnings("deprecation") public void Var027() { try { sb.setLength(0); @@ -733,6 +760,7 @@ public void Var027() { /** * getUnicodeStream() - Get from a BINARY. **/ + @SuppressWarnings("deprecation") public void Var028() { try { sb.setLength(0); @@ -757,6 +785,7 @@ else if (getRelease() < JDTestDriver.RELEASE_V7R1M0) // @F1A // @K2 /** * getUnicodeStream() - Get from a VARBINARY. **/ + @SuppressWarnings("deprecation") public void Var029() { try { sb.setLength(0); @@ -782,6 +811,7 @@ else if (getRelease() < JDTestDriver.RELEASE_V7R1M0) // @F1A // @K2 * getUnicodeStream() - Get from a CLOB, when the CLOB data is returned in the * result set. **/ + @SuppressWarnings("deprecation") public void Var030() { if (checkLobSupport()) { sb.setLength(0); @@ -807,6 +837,7 @@ public void Var030() { * getUnicodeStream() - Get from a CLOB, when the CLOB locator is returned in * the result set. **/ + @SuppressWarnings("deprecation") public void Var031() { if (checkLobSupport()) { sb.setLength(0); @@ -833,6 +864,7 @@ public void Var031() { * getUnicodeStream() - Get from a DBCLOB, when the DBCLOB data is returned in * the result set. **/ + @SuppressWarnings("deprecation") public void Var032() { if (checkLobSupport()) { sb.setLength(0); @@ -859,6 +891,7 @@ public void Var032() { * getUnicodeStream() - Get from a DBCLOB, when the DBCLOB locator is returned * in the result set. **/ + @SuppressWarnings("deprecation") public void Var033() { if (checkLobSupport()) { sb.setLength(0); @@ -885,6 +918,7 @@ public void Var033() { * getUnicodeStream() - Get from a BLOB, when the BLOB data is returned in the * result set. **/ + @SuppressWarnings("deprecation") public void Var034() { if (checkLobSupport()) { sb.setLength(0); @@ -911,6 +945,7 @@ else if (getRelease() < JDTestDriver.RELEASE_V7R1M0) // @K1A // @K2 * getUnicodeStream() - Get from a BLOB, when the BLOB locator is returned in * the result set. **/ + @SuppressWarnings("deprecation") public void Var035() { if (checkLobSupport()) { sb.setLength(0); @@ -945,6 +980,7 @@ else if (getRelease() < JDTestDriver.RELEASE_V7R1M0) // @K1A // @K2 /** * getUnicodeStream() - Get from a DATE. **/ + @SuppressWarnings("deprecation") public void Var036() { sb.setLength(0); sb.append(" getUnicodeStream from DATE -- updated 12/14/2011"); @@ -966,6 +1002,7 @@ public void Var036() { /** * getUnicodeStream() - Get from a TIME. **/ + @SuppressWarnings("deprecation") public void Var037() { sb.setLength(0); try { @@ -985,6 +1022,7 @@ public void Var037() { /** * getUnicodeStream() - Get from a TIMESTAMP. **/ + @SuppressWarnings("deprecation") public void Var038() { sb.setLength(0); try { @@ -1013,7 +1051,8 @@ public void Var038() { * full URL value for the datalink. This is, in essence, a String and can be * retrieved with getUnicodeStream as other Strings can. **/ - public void Var039() { + @SuppressWarnings("deprecation") + public void Var039() { if (checkDatalinkSupport()) { try { Statement s = connection_.createStatement(); @@ -1047,7 +1086,8 @@ && getRelease() >= JDTestDriver.RELEASE_V7R1M0 && isJDK14) // @K1C * full URL value for the datalink. This is, in essence, a String and can be * retrieved with getUnicodeStream as other Strings can. **/ - public void Var040() { + @SuppressWarnings("deprecation") + public void Var040() { if (checkDatalinkSupport()) { try { Statement s = connection_.createStatement(); @@ -1073,7 +1113,8 @@ && getRelease() >= JDTestDriver.RELEASE_V7R1M0 && isJDK14) // @K1C /** * getUnicodeStream() - Get from a DISTINCT. **/ - public void Var041() { + @SuppressWarnings("deprecation") +public void Var041() { if (checkLobSupport()) { sb.setLength(0); @@ -1098,7 +1139,8 @@ public void Var041() { /** * getUnicodeStream() - Get from a BIGINT. **/ - public void Var042() { + @SuppressWarnings("deprecation") + public void Var042() { sb.setLength(0); sb.append(" -- getUnicodeStream from BIGINT updated 12/14/2011"); if (checkBigintSupport()) { @@ -1119,6 +1161,7 @@ public void Var042() { * getUnicodeStream() - Verify that no DataTruncation is posted when the max * field size is set to 0. **/ + @SuppressWarnings("deprecation") public void Var043() { sb.setLength(0); @@ -1149,7 +1192,8 @@ public void Var043() { * getUnicodeStream() - Verify that data is truncated without a DataTruncation * posted when the max field size is set to a value shorter than the string. **/ - public void Var044() { + @SuppressWarnings("deprecation") + public void Var044() { sb.setLength(0); try { @@ -1179,7 +1223,8 @@ public void Var044() { /** * getUnicodeStream() - Get from DFP16: **/ - public void Var045() { + @SuppressWarnings("deprecation") + public void Var045() { if (checkDecFloatSupport()) { sb.setLength(0); try { @@ -1200,7 +1245,8 @@ public void Var045() { /** * getUnicodeStream() - Get from DFP34: **/ - public void Var046() { + @SuppressWarnings("deprecation") + public void Var046() { if (checkDecFloatSupport()) { sb.setLength(0); @@ -1262,7 +1308,8 @@ public void Var048() { /** getUnicodeStream() - Get from a BOOLEAN true . **/ - public void Var049 () + @SuppressWarnings("deprecation") + public void Var049 () { if (checkBooleanSupport()) { sb.setLength(0); @@ -1287,7 +1334,8 @@ public void Var049 () /** getUnicodeStream() - Get from a BOOLEAN false . **/ - public void Var050 () + @SuppressWarnings("deprecation") + public void Var050 () { if (checkBooleanSupport()) { sb.setLength(0); @@ -1309,6 +1357,7 @@ public void Var050 () /** getUnicodeStream() - Get from a BOOLEAN null . **/ + @SuppressWarnings("deprecation") public void Var051 () { if (checkBooleanSupport()) { diff --git a/src/test/JD/RS/JDRSInsertRow.java b/src/test/JD/RS/JDRSInsertRow.java index c17c5ab..47aff3b 100644 --- a/src/test/JD/RS/JDRSInsertRow.java +++ b/src/test/JD/RS/JDRSInsertRow.java @@ -14,20 +14,18 @@ package test.JD.RS; +import java.io.FileOutputStream; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.Hashtable; +import java.util.Vector; + import com.ibm.as400.access.AS400; import test.JDRSTest; import test.JDTestDriver; import test.JDTestcase; -import java.io.FileOutputStream; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Hashtable; - /** @@ -70,7 +68,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSInsertRow (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -241,11 +239,12 @@ public void Var005() { if (checkJdbc20 ()) { try { + /* Statement s = connection_.createStatement (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = s.executeQuery ("SELECT * FROM " + JDRSTest.COLLECTION + ".ISNONULL"); - + */ rs_.moveToInsertRow (); rs_.updateInt ("A", 747); rs_.updateInt ("C", -222); @@ -428,7 +427,7 @@ public void Var008() afterNulls[i] = rs2.wasNull (); } int insertedColumn1 = rs2.findColumn ("C_INTEGER") - 1; - int insertedColumn2 = rs2.findColumn ("C_SMALLINT") - 1; + rs2.findColumn ("C_SMALLINT") ; int insertedColumn3 = rs2.findColumn ("C_CHAR_1") - 1; rs2.close (); @@ -479,7 +478,7 @@ public void Var009() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - int columnCount = rs_.getMetaData ().getColumnCount (); + rs_.getMetaData ().getColumnCount (); rs_.moveToInsertRow (); rs_.updateString ("C_VARCHAR_50", "Space people"); @@ -504,7 +503,7 @@ public void Var010() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - int columnCount = rs_.getMetaData ().getColumnCount (); + rs_.getMetaData ().getColumnCount (); rs_.moveToInsertRow (); rs_.updateString ("C_VARCHAR_50", "Martians"); diff --git a/src/test/JD/RS/JDRSLast.java b/src/test/JD/RS/JDRSLast.java index 375b443..28555db 100644 --- a/src/test/JD/RS/JDRSLast.java +++ b/src/test/JD/RS/JDRSLast.java @@ -28,7 +28,7 @@ import java.sql.SQLWarning; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -72,7 +72,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSLast (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -591,7 +591,8 @@ public void Var018 () /** last() - Should clear any warnings. **/ - public void Var019 () + @SuppressWarnings("deprecation") + public void Var019 () { if (checkJdbc20 ()) { try { @@ -1942,7 +1943,8 @@ public void Var078 () /** last() - Should clear any warnings. **/ - public void Var079 () + @SuppressWarnings("deprecation") + public void Var079 () { if (checkJdbc20 ()) { try { diff --git a/src/test/JD/RS/JDRSMisc.java b/src/test/JD/RS/JDRSMisc.java index b6a8179..520c401 100644 --- a/src/test/JD/RS/JDRSMisc.java +++ b/src/test/JD/RS/JDRSMisc.java @@ -29,7 +29,7 @@ import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** @@ -75,7 +75,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSMisc (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSMoveToCurrentRow.java b/src/test/JD/RS/JDRSMoveToCurrentRow.java index 38d5ac4..e0df78b 100644 --- a/src/test/JD/RS/JDRSMoveToCurrentRow.java +++ b/src/test/JD/RS/JDRSMoveToCurrentRow.java @@ -14,20 +14,17 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.DriverManager; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestcase; @@ -55,7 +52,6 @@ public static void main(String args[]) throws Exception { // Private data. - private DatabaseMetaData dmd_; private Statement statement_; private Statement statement2_; @@ -65,7 +61,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSMoveToCurrentRow (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -89,7 +85,6 @@ protected void setup () if (connection_ != null) connection_.close(); if (isJdbc20 ()) { connection_ = testDriver_.getConnection (baseURL_ + ";data truncation=true", userId_, encryptedPassword_); - dmd_ = connection_.getMetaData (); // This statement is forward only. statement_ = connection_.createStatement (ResultSet.TYPE_FORWARD_ONLY, @@ -586,6 +581,7 @@ public void Var019 () /** moveToCurrentRow() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var020 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSMoveToInsertRow.java b/src/test/JD/RS/JDRSMoveToInsertRow.java index aced377..a54201c 100644 --- a/src/test/JD/RS/JDRSMoveToInsertRow.java +++ b/src/test/JD/RS/JDRSMoveToInsertRow.java @@ -14,20 +14,18 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestcase; - import java.io.FileOutputStream; import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.DriverManager; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestcase; @@ -55,7 +53,6 @@ public static void main(String args[]) throws Exception { // Private data. - private DatabaseMetaData dmd_; private Statement statement_; private Statement statement2_; private Statement statement3_; @@ -67,7 +64,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSMoveToInsertRow (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -98,8 +95,7 @@ protected void setup () connection_.setAutoCommit (false); connection_.setTransactionIsolation (Connection.TRANSACTION_READ_UNCOMMITTED); - dmd_ = connection_.getMetaData (); - + // This statement is forward only. statement_ = connection_.createStatement (ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); @@ -445,6 +441,7 @@ public void Var012 () /** moveToInsertRow() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var013 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSNext.java b/src/test/JD/RS/JDRSNext.java index aa76dc9..9985b0a 100644 --- a/src/test/JD/RS/JDRSNext.java +++ b/src/test/JD/RS/JDRSNext.java @@ -14,22 +14,20 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DatabaseMetaData; -import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -70,7 +68,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSNext (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -546,6 +544,7 @@ public void Var016 () /** next() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var017 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSPrevious.java b/src/test/JD/RS/JDRSPrevious.java index af87b4f..86bc65b 100644 --- a/src/test/JD/RS/JDRSPrevious.java +++ b/src/test/JD/RS/JDRSPrevious.java @@ -14,22 +14,20 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DatabaseMetaData; - import java.sql.PreparedStatement; import java.sql.ResultSet; - import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -67,7 +65,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSPrevious (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -575,6 +573,7 @@ public void Var017 () /** previous() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var018 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSRefreshRow.java b/src/test/JD/RS/JDRSRefreshRow.java index d0801db..2411013 100644 --- a/src/test/JD/RS/JDRSRefreshRow.java +++ b/src/test/JD/RS/JDRSRefreshRow.java @@ -14,22 +14,20 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DatabaseMetaData; -import java.sql.SQLException; - import java.sql.ResultSet; - +import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -67,7 +65,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSRefreshRow (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -530,7 +528,8 @@ public void Var016 () /** refreshRow() - Should clear any warnings. **/ - public void Var017 () + @SuppressWarnings("deprecation") + public void Var017 () { if (checkJdbc20 ()) { try { diff --git a/src/test/JD/RS/JDRSRelative.java b/src/test/JD/RS/JDRSRelative.java index c728ab4..22cea78 100644 --- a/src/test/JD/RS/JDRSRelative.java +++ b/src/test/JD/RS/JDRSRelative.java @@ -14,20 +14,20 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLWarning; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -64,7 +64,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSRelative (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -1228,6 +1228,7 @@ public void Var038 () /** relative() - Should clear any warnings. **/ + @SuppressWarnings("deprecation") public void Var039 () { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSStress.java b/src/test/JD/RS/JDRSStress.java index 8ab0135..2291c28 100644 --- a/src/test/JD/RS/JDRSStress.java +++ b/src/test/JD/RS/JDRSStress.java @@ -20,7 +20,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; import java.util.Random; import com.ibm.as400.access.AS400; @@ -74,7 +74,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStress (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -89,7 +89,7 @@ public JDRSStress (AS400 systemObject, public JDRSStress (AS400 systemObject, String testname, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressDirectMap.java b/src/test/JD/RS/JDRSStressDirectMap.java index e6ab946..fc0fa92 100644 --- a/src/test/JD/RS/JDRSStressDirectMap.java +++ b/src/test/JD/RS/JDRSStressDirectMap.java @@ -16,7 +16,7 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** @@ -42,7 +42,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressDirectMap (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressNoBlockPSDirectMap.java b/src/test/JD/RS/JDRSStressNoBlockPSDirectMap.java index 512e543..857e745 100644 --- a/src/test/JD/RS/JDRSStressNoBlockPSDirectMap.java +++ b/src/test/JD/RS/JDRSStressNoBlockPSDirectMap.java @@ -17,7 +17,7 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** @@ -43,7 +43,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressNoBlockPSDirectMap (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressPS.java b/src/test/JD/RS/JDRSStressPS.java index d1640c7..0f37cda 100644 --- a/src/test/JD/RS/JDRSStressPS.java +++ b/src/test/JD/RS/JDRSStressPS.java @@ -18,7 +18,7 @@ import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -45,7 +45,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressPS (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressPSBatch.java b/src/test/JD/RS/JDRSStressPSBatch.java index 7bdd536..25e96bf 100644 --- a/src/test/JD/RS/JDRSStressPSBatch.java +++ b/src/test/JD/RS/JDRSStressPSBatch.java @@ -17,7 +17,7 @@ import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -44,7 +44,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressPSBatch (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressPSDirectMap.java b/src/test/JD/RS/JDRSStressPSDirectMap.java index 5574d37..d32ec55 100644 --- a/src/test/JD/RS/JDRSStressPSDirectMap.java +++ b/src/test/JD/RS/JDRSStressPSDirectMap.java @@ -16,7 +16,7 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** @@ -42,7 +42,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressPSDirectMap (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressScroll.java b/src/test/JD/RS/JDRSStressScroll.java index ccb6710..1e313aa 100644 --- a/src/test/JD/RS/JDRSStressScroll.java +++ b/src/test/JD/RS/JDRSStressScroll.java @@ -18,7 +18,7 @@ import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -45,7 +45,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressScroll (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressScrollDirectMap.java b/src/test/JD/RS/JDRSStressScrollDirectMap.java index be5434e..112f364 100644 --- a/src/test/JD/RS/JDRSStressScrollDirectMap.java +++ b/src/test/JD/RS/JDRSStressScrollDirectMap.java @@ -17,7 +17,7 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** @@ -43,7 +43,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressScrollDirectMap (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressScrollPS.java b/src/test/JD/RS/JDRSStressScrollPS.java index ec49bae..0c7fe04 100644 --- a/src/test/JD/RS/JDRSStressScrollPS.java +++ b/src/test/JD/RS/JDRSStressScrollPS.java @@ -18,7 +18,7 @@ import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; @@ -45,7 +45,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressScrollPS (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressScrollPSDirectMap.java b/src/test/JD/RS/JDRSStressScrollPSDirectMap.java index 90c5233..c6f7b98 100644 --- a/src/test/JD/RS/JDRSStressScrollPSDirectMap.java +++ b/src/test/JD/RS/JDRSStressScrollPSDirectMap.java @@ -17,7 +17,7 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** @@ -43,7 +43,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressScrollPSDirectMap (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressUpdatePS.java b/src/test/JD/RS/JDRSStressUpdatePS.java index 1f8f046..327c17b 100644 --- a/src/test/JD/RS/JDRSStressUpdatePS.java +++ b/src/test/JD/RS/JDRSStressUpdatePS.java @@ -16,7 +16,7 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** @@ -42,7 +42,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressUpdatePS (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSStressUpdatePSDirectMap.java b/src/test/JD/RS/JDRSStressUpdatePSDirectMap.java index 0077fb1..a5da9aa 100644 --- a/src/test/JD/RS/JDRSStressUpdatePSDirectMap.java +++ b/src/test/JD/RS/JDRSStressUpdatePSDirectMap.java @@ -16,7 +16,7 @@ import com.ibm.as400.access.AS400; import java.io.FileOutputStream; -import java.util.Hashtable; +import java.util.Hashtable; import java.util.Vector; /** @@ -42,7 +42,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSStressUpdatePSDirectMap (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSTestcase.java b/src/test/JD/RS/JDRSTestcase.java index 4f153a6..3dddc42 100644 --- a/src/test/JD/RS/JDRSTestcase.java +++ b/src/test/JD/RS/JDRSTestcase.java @@ -14,20 +14,18 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; - - import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -55,7 +53,7 @@ public class JDRSTestcase **/ public JDRSTestcase (AS400 systemObject, String testname, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -250,7 +248,6 @@ public void testDfp(String table, String[] expectedArray, Statement statement0, */ public void baseTruncationTest(String x, String method ) { - if(true ) { try { Statement stmt = connection_.createStatement(); ResultSet rs = stmt.executeQuery ("SELECT "+x+" FROM SYSIBM.SYSDUMMY1"); @@ -277,9 +274,6 @@ public void baseTruncationTest(String x, String method ) { catch (Exception e2) { failed(e2, "Unexpected Exception"); } - } else { - notApplicable("V5R5 and later 'numeric truncation test'"); - } } diff --git a/src/test/JD/RS/JDRSUpdateAsciiStream.java b/src/test/JD/RS/JDRSUpdateAsciiStream.java index be6af1c..8d6f78d 100644 --- a/src/test/JD/RS/JDRSUpdateAsciiStream.java +++ b/src/test/JD/RS/JDRSUpdateAsciiStream.java @@ -14,30 +14,28 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; -import test.JD.JDWeirdInputStream; - import java.io.ByteArrayInputStream; import java.io.FileOutputStream; -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.Date; -import java.sql.SQLException; - import java.sql.ResultSet; - +import java.sql.SQLException; import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; +import test.JD.JDWeirdInputStream; @@ -79,7 +77,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateAsciiStream (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateBigDecimal.java b/src/test/JD/RS/JDRSUpdateBigDecimal.java index 16c6d6f..dd08cc0 100644 --- a/src/test/JD/RS/JDRSUpdateBigDecimal.java +++ b/src/test/JD/RS/JDRSUpdateBigDecimal.java @@ -14,13 +14,6 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; -import test.JVMInfo; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.math.BigInteger; @@ -29,9 +22,16 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; - import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; +import test.JVMInfo; @@ -83,7 +83,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateBigDecimal (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -1775,9 +1775,6 @@ public void Var056() rs.next(); String value=rs.getString(1); String expectedValue = "1700000000.00"; - if (false) { - expectedValue = "1700000000.00"; - } rs.close(); cleanupTable(statement_, tableName); @@ -1829,9 +1826,7 @@ public void Var057() String expectedValue = "0.0000001700"; if(isToolboxDriver()) expectedValue = "0.0000001700"; //@big TB always this format - else if (false) { - expectedValue = "0.0000001700"; - }else if(isJdbc40()) { + else if(isJdbc40()) { if ((getRelease() == JDTestDriver.RELEASE_V7R1M0) && (getDriver() == JDTestDriver.DRIVER_NATIVE)) { // In V5R4, the native driver returns the other value @@ -1885,11 +1880,7 @@ public void Var058() ResultSet rs = ps.executeQuery(); rs.next(); BigDecimal bd; - if (false) { - bd = new BigDecimal("1700000000"); - } else { bd = new BigDecimal (new BigInteger("17"),-8 ); - } rs.updateBigDecimal (1, bd); rs.updateRow(); rs.close(); @@ -1899,9 +1890,6 @@ public void Var058() rs.next(); String value=rs.getString(1); String expectedValue = "1700000000.00"; - if (false) { - expectedValue = "1700000000.00"; - } rs.close(); cleanupTable(statement_, tableName); assertCondition(expectedValue.equals(value), "value("+value+") != "+expectedValue+added); @@ -1958,150 +1946,67 @@ public void dfpTest(String table, String value, String expected) { public void Var061 () { dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456", "-1234567890123456");} public void Var062 () { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456","1234567890123456");} public void Var063 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","1.234567890123456E+43"); - } } public void Var064 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","1.234567890123456E+43"); - } } public void Var065 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","1.234567890123456E+43"); - } } public void Var066 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+12345678901234.56E+30", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+12345678901234.56E+30","1.234567890123456E+43"); - } } public void Var067 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123.456E+31", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123.456E+31","1.234567890123456E+43"); - } } public void Var068 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+123456789012.3456E+32", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+123456789012.3456E+32","1.234567890123456E+43"); - } } public void Var069 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+12345678901.23456E+33", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+12345678901.23456E+33","1.234567890123456E+43"); - } } public void Var070 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890.123456E+34", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890.123456E+34","1.234567890123456E+43"); - } } public void Var071 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+123456789.0123456E+35", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+123456789.0123456E+35","1.234567890123456E+43"); - } } public void Var072 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+12345678.90123456E+36", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+12345678.90123456E+36","1.234567890123456E+43"); - } } public void Var073 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567.890123456E+37", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567.890123456E+37","1.234567890123456E+43"); - } } public void Var074 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+123456.7890123456E+38", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+123456.7890123456E+38","1.234567890123456E+43"); - } } public void Var075 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+12345.67890123456E+39", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+12345.67890123456E+39","1.234567890123456E+43"); - } } public void Var076 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234.567890123456E+40", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234.567890123456E+40","1.234567890123456E+43"); - } } public void Var077 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+123.4567890123456E+41", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+123.4567890123456E+41","1.234567890123456E+43"); - } } public void Var078 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+12.34567890123456E+42", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+12.34567890123456E+42","1.234567890123456E+43"); - } } public void Var079 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1.234567890123456E+43", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1.234567890123456E+43","1.234567890123456E+43"); - } } public void Var080 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+.1234567890123456E+44", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+.1234567890123456E+44","1.234567890123456E+43"); - } } public void Var081 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+0.1234567890123456E+44", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+0.1234567890123456E+44","1.234567890123456E+43"); - } } public void Var082 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","1.234567890123456E+43"); - } } public void Var083 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-12345678901234560000000000000000000000000000"); - } else { - dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-1.234567890123456E+43");} + dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-1.234567890123456E+43"); } public void Var084 () { dfpTest(JDRSTest.RSTEST_DFP16, "1E0", "1");} @@ -2117,151 +2022,67 @@ public void Var083 () { public void Var090 () { dfpTest(JDRSTest.RSTEST_DFP34, "-1234567890123456", "-1234567890123456");} public void Var091 () { dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890123456","1234567890123456");} public void Var092 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890123456E28", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890123456E28","1.234567890123456E+43"); - } } public void Var093 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890123456E+28", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890123456E+28","1.234567890123456E+43"); - } } public void Var094 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+123456789012345.6E+29", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+123456789012345.6E+29","1.234567890123456E+43"); - } } public void Var095 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+12345678901234.56E+30", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+12345678901234.56E+30","1.234567890123456E+43"); - } } public void Var096 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890123.456E+31", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890123.456E+31","1.234567890123456E+43"); - } } public void Var097 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+123456789012.3456E+32", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+123456789012.3456E+32","1.234567890123456E+43"); - } } public void Var098 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+12345678901.23456E+33", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+12345678901.23456E+33","1.234567890123456E+43"); - } } public void Var099 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890.123456E+34", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+1234567890.123456E+34","1.234567890123456E+43"); - } } public void Var100 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+123456789.0123456E+35", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+123456789.0123456E+35","1.234567890123456E+43"); - } } public void Var101 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+12345678.90123456E+36", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+12345678.90123456E+36","1.234567890123456E+43"); - } } public void Var102 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+1234567.890123456E+37", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+1234567.890123456E+37","1.234567890123456E+43"); - } } public void Var103 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+123456.7890123456E+38", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+123456.7890123456E+38","1.234567890123456E+43"); - } } public void Var104 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+12345.67890123456E+39", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+12345.67890123456E+39","1.234567890123456E+43"); - } } public void Var105 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+1234.567890123456E+40", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+1234.567890123456E+40","1.234567890123456E+43"); - } } public void Var106 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+123.4567890123456E+41", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+123.4567890123456E+41","1.234567890123456E+43"); - } } public void Var107 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+12.34567890123456E+42", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+12.34567890123456E+42","1.234567890123456E+43"); - } } public void Var108 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+1.234567890123456E+43", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+1.234567890123456E+43","1.234567890123456E+43"); - } } public void Var109 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+.1234567890123456E+44", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+.1234567890123456E+44","1.234567890123456E+43"); - } } public void Var110 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+0.1234567890123456E+44", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+0.1234567890123456E+44","1.234567890123456E+43"); - } } public void Var111 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "+0.01234567890123456E+45", "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "+0.01234567890123456E+45","1.234567890123456E+43"); - } } public void Var112 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, "-1234567890123456E28","-12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, "-1234567890123456E28","-1.234567890123456E+43"); - } } public void Var113 () { dfpTest(JDRSTest.RSTEST_DFP34, "1E0", "1");} public void Var114 () { dfpTest(JDRSTest.RSTEST_DFP34, "1.1", "1.1");} @@ -3023,9 +2844,7 @@ public void Var143() String expectedValue = "0,0000001700"; if(isToolboxDriver()) expectedValue = "0,0000001700"; //@big TB always this format - else if (false) { - expectedValue = "0,0000001700"; - }else if ( isJdbc40()) { + else if ( isJdbc40()) { if ((getRelease() == JDTestDriver.RELEASE_V7R1M0) && (getDriver() == JDTestDriver.DRIVER_NATIVE) ) { // In V5R4 the native driver still returns the old value @@ -3080,11 +2899,7 @@ public void Var144() ResultSet rs = ps.executeQuery(); rs.next(); BigDecimal bd; - if (false) { - bd = new BigDecimal("1700000000"); - } else { bd = new BigDecimal (new BigInteger("17"),-8 ); - } rs.updateBigDecimal (1, bd); rs.updateRow(); @@ -3094,9 +2909,6 @@ public void Var144() rs.next(); String value=rs.getString(1); String expectedValue = "1700000000,00"; - if (false) { - expectedValue = "1700000000,00"; - } rs.close(); cleanupTable(statementCommaSeparator_, tableName); assertCondition(expectedValue.equals(value), "value("+value+") != "+expectedValue+added); @@ -3147,9 +2959,7 @@ public void Var145() String expectedValue = "0,0000001700"; if(isToolboxDriver()) expectedValue = "0,0000001700"; //@big TB always this format - else if (false) { - expectedValue = "0,0000001700"; - }else if(isJdbc40()) { + else if(isJdbc40()) { if ((getRelease() == JDTestDriver.RELEASE_V7R1M0) && (getDriver() == JDTestDriver.DRIVER_NATIVE)) { // In V5R4, the native driver returns the other value @@ -3203,11 +3013,7 @@ public void Var146() ResultSet rs = ps.executeQuery(); rs.next(); BigDecimal bd; - if (false) { - bd = new BigDecimal("1700000000"); - } else { bd = new BigDecimal (new BigInteger("17"),-8 ); - } rs.updateBigDecimal (1, bd); rs.updateRow(); rs.close(); @@ -3217,9 +3023,6 @@ public void Var146() rs.next(); String value=rs.getString(1); String expectedValue = "1700000000,00"; - if (false) { - expectedValue = "1700000000,00"; - } rs.close(); cleanupTable(statementCommaSeparator_,tableName); assertCondition(expectedValue.equals(value), "value("+value+") != "+expectedValue+added); @@ -3278,150 +3081,67 @@ public void dfpTestCommaSeparator(String table, String value, String expected) { public void Var149 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456", "-1234567890123456");} public void Var150 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456","1234567890123456");} public void Var151 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","1,234567890123456E+43"); - } } public void Var152 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","1,234567890123456E+43"); - } } public void Var153 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","1,234567890123456E+43"); - } } public void Var154 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12345678901234.56E+30", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12345678901234.56E+30","1,234567890123456E+43"); - } } public void Var155 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123.456E+31", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123.456E+31","1,234567890123456E+43"); - } } public void Var156 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789012.3456E+32", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789012.3456E+32","1,234567890123456E+43"); - } } public void Var157 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12345678901.23456E+33", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12345678901.23456E+33","1,234567890123456E+43"); - } } public void Var158 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890.123456E+34", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890.123456E+34","1,234567890123456E+43"); - } } public void Var159 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789.0123456E+35", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789.0123456E+35","1,234567890123456E+43"); - } } public void Var160 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12345678.90123456E+36", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12345678.90123456E+36","1,234567890123456E+43"); - } } public void Var161 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567.890123456E+37", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567.890123456E+37","1,234567890123456E+43"); - } } public void Var162 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456.7890123456E+38", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456.7890123456E+38","1,234567890123456E+43"); - } } public void Var163 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12345.67890123456E+39", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12345.67890123456E+39","1,234567890123456E+43"); - } } public void Var164 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234.567890123456E+40", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234.567890123456E+40","1,234567890123456E+43"); - } } public void Var165 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123.4567890123456E+41", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123.4567890123456E+41","1,234567890123456E+43"); - } } public void Var166 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12.34567890123456E+42", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+12.34567890123456E+42","1,234567890123456E+43"); - } } public void Var167 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1.234567890123456E+43", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1.234567890123456E+43","1,234567890123456E+43"); - } } public void Var168 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+.1234567890123456E+44", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+.1234567890123456E+44","1,234567890123456E+43"); - } } public void Var169 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+0.1234567890123456E+44", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+0.1234567890123456E+44","1,234567890123456E+43"); - } } public void Var170 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","1,234567890123456E+43"); - } } public void Var171 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-12345678901234560000000000000000000000000000"); - } else { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-1,234567890123456E+43");} + dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-1,234567890123456E+43"); } public void Var172 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "1E0", "1");} @@ -3437,144 +3157,64 @@ public void Var171 () { public void Var178 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "-1234567890123456", "-1234567890123456");} public void Var179 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890123456","1234567890123456");} public void Var180 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890123456E28", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890123456E28","1,234567890123456E+43"); - } } public void Var181 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890123456E+28", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890123456E+28","1,234567890123456E+43"); - } } public void Var182 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123456789012345.6E+29", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123456789012345.6E+29","1,234567890123456E+43"); - } } public void Var183 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12345678901234.56E+30", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12345678901234.56E+30","1,234567890123456E+43"); - } } public void Var184 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890123.456E+31", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890123.456E+31","1,234567890123456E+43"); - } } public void Var185 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123456789012.3456E+32", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123456789012.3456E+32","1,234567890123456E+43"); - } } public void Var186 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12345678901.23456E+33", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12345678901.23456E+33","1,234567890123456E+43"); - } } public void Var187 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890.123456E+34", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567890.123456E+34","1,234567890123456E+43"); - } } public void Var188 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123456789.0123456E+35", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123456789.0123456E+35","1,234567890123456E+43"); - } } public void Var189 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12345678.90123456E+36", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12345678.90123456E+36","1,234567890123456E+43"); - } } public void Var190 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567.890123456E+37", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234567.890123456E+37","1,234567890123456E+43"); - } } public void Var191 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123456.7890123456E+38", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123456.7890123456E+38","1,234567890123456E+43"); - } } public void Var192 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12345.67890123456E+39", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12345.67890123456E+39","1,234567890123456E+43"); - } } public void Var193 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234.567890123456E+40", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1234.567890123456E+40","1,234567890123456E+43"); - } } public void Var194 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123.4567890123456E+41", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+123.4567890123456E+41","1,234567890123456E+43"); - } } public void Var195 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12.34567890123456E+42", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+12.34567890123456E+42","1,234567890123456E+43"); - } } public void Var196 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1.234567890123456E+43", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+1.234567890123456E+43","1,234567890123456E+43"); - } } public void Var197 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+.1234567890123456E+44", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+.1234567890123456E+44","1,234567890123456E+43"); - } } public void Var198 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+0.1234567890123456E+44", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+0.1234567890123456E+44","1,234567890123456E+43"); - } } public void Var199 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+0.01234567890123456E+45", "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "+0.01234567890123456E+45","1,234567890123456E+43"); - } } public void Var200 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP34, "-1234567890123456E28","-1,234567890123456E+43"); diff --git a/src/test/JD/RS/JDRSUpdateBinaryStream.java b/src/test/JD/RS/JDRSUpdateBinaryStream.java index a24df52..a934ebf 100644 --- a/src/test/JD/RS/JDRSUpdateBinaryStream.java +++ b/src/test/JD/RS/JDRSUpdateBinaryStream.java @@ -14,25 +14,23 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; -import test.JD.JDWeirdInputStream; - import java.io.ByteArrayInputStream; import java.io.FileOutputStream; -import java.io.InputStream; import java.io.IOException; -import java.sql.Connection; +import java.io.InputStream; import java.sql.DataTruncation; -import java.sql.SQLException; - import java.sql.ResultSet; - +import java.sql.SQLException; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; +import test.JD.JDWeirdInputStream; @@ -73,7 +71,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateBinaryStream (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -285,7 +283,7 @@ public void Var007() JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -374,7 +372,7 @@ public void Var011() JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -440,7 +438,7 @@ public void Var014() JDRSTest.position (rs_, key_); byte[] ba = new byte[] { (byte) 0, (byte) 1, (byte) -1, (byte) 2, (byte) -2 }; rs_.updateBinaryStream ("C_VARBINARY_20", new ByteArrayInputStream (ba), ba.length); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -463,7 +461,7 @@ public void Var015() byte[] ba = new byte[] { (byte) 0, (byte) 56, (byte) 1, (byte) -1, (byte) 2, (byte) -2 }; rs_.updateBinaryStream ("C_VARBINARY_20", new ByteArrayInputStream (ba), ba.length); rs_.updateRow (); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -489,7 +487,7 @@ public void Var016() rs_.beforeFirst (); JDRSTest.position (rs_, key_); byte[] v = rs_.getBytes ("C_VARBINARY_20"); - assertCondition (isEqual (ba, v)); + assertCondition (areEqual (ba, v)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -514,7 +512,7 @@ public void Var017() rs_.updateBinaryStream ("C_VARBINARY_20", new ByteArrayInputStream (ba), ba.length); rs_.insertRow (); JDRSTest.position (rs_, "JDRSUpdateBinaryStream 1"); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -535,7 +533,7 @@ public void Var018() rs_.moveToInsertRow (); byte[] ba = new byte[] { (byte) 121, (byte) 0, (byte) 56, (byte) -1, (byte) 2, (byte) -2 }; rs_.updateBinaryStream ("C_VARBINARY_20", new ByteArrayInputStream (ba), ba.length); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -753,7 +751,7 @@ public void Var029 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -807,7 +805,7 @@ public void Var031 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -835,7 +833,7 @@ public void Var032 () isToolboxDriver() ) // @D2 { byte[] afterUpdate = rs_.getBytes("C_VARBINARY_20"); - assertCondition(isEqual(afterUpdate, expected)); + assertCondition(areEqual(afterUpdate, expected)); } else failed ("Didn't throw SQLException"); @@ -892,7 +890,7 @@ public void Var034 () isToolboxDriver() ) // @D2 { byte[] afterUpdate = rs_.getBytes("C_VARBINARY_20"); //allow updateBinaryStream if length is less than stream length - assertCondition(isEqual(afterUpdate, expected)); + assertCondition(areEqual(afterUpdate, expected)); } else failed ("Didn't throw SQLException"); @@ -960,7 +958,7 @@ public void Var036 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -985,7 +983,7 @@ public void Var037 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -1131,7 +1129,7 @@ public void Var042 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BLOB"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); //} else { //@D1D //failed ("Didn't throw SQLException"); //@D1D //} //@D1D @@ -1306,7 +1304,7 @@ public void Var049() JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba), "Not equal "+added ); + assertCondition (areEqual (v, ba), "Not equal "+added ); } catch (Exception e) { failed (e, "Unexpected Exception "+added); @@ -1348,7 +1346,7 @@ public void Var050() JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba), "Not equal "+added ); + assertCondition (areEqual (v, ba), "Not equal "+added ); } catch (Exception e) { failed (e, "Unexpected Exception "+added); diff --git a/src/test/JD/RS/JDRSUpdateBoolean.java b/src/test/JD/RS/JDRSUpdateBoolean.java index 61a433f..09a05b4 100644 --- a/src/test/JD/RS/JDRSUpdateBoolean.java +++ b/src/test/JD/RS/JDRSUpdateBoolean.java @@ -14,17 +14,18 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -66,7 +67,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateBoolean (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateByte.java b/src/test/JD/RS/JDRSUpdateByte.java index 0aa0576..9ef995a 100644 --- a/src/test/JD/RS/JDRSUpdateByte.java +++ b/src/test/JD/RS/JDRSUpdateByte.java @@ -14,19 +14,19 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -68,7 +68,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateByte (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateBytes.java b/src/test/JD/RS/JDRSUpdateBytes.java index 3a307e0..ce80f0c 100644 --- a/src/test/JD/RS/JDRSUpdateBytes.java +++ b/src/test/JD/RS/JDRSUpdateBytes.java @@ -14,18 +14,18 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -67,7 +67,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateBytes (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -279,7 +279,7 @@ public void Var007() JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -368,7 +368,7 @@ public void Var011() JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -415,7 +415,7 @@ public void Var013() JDRSTest.position (rs_, key_); byte[] ba = new byte[] { (byte) 0, (byte) 1, (byte) -1, (byte) 2, (byte) -2 }; rs_.updateBytes ("C_VARBINARY_20", ba); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -438,7 +438,7 @@ public void Var014() byte[] ba = new byte[] { (byte) 0, (byte) 56, (byte) 1, (byte) -1, (byte) 2, (byte) -2 }; rs_.updateBytes ("C_VARBINARY_20", ba); rs_.updateRow (); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -464,7 +464,7 @@ public void Var015() rs_.beforeFirst (); JDRSTest.position (rs_, key_); byte[] v = rs_.getBytes ("C_VARBINARY_20"); - assertCondition (isEqual (ba, v)); + assertCondition (areEqual (ba, v)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -490,7 +490,7 @@ public void Var016() rs_.updateBytes ("C_VARBINARY_20", ba); rs_.insertRow (); JDRSTest.position (rs_, "JDRSUpdateBytes 1"); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -511,7 +511,7 @@ public void Var017() rs_.moveToInsertRow (); byte[] ba = new byte[] { (byte) 121, (byte) 0, (byte) 56, (byte) -1, (byte) 2, (byte) -2 }; rs_.updateBytes ("C_VARBINARY_20", ba); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -729,7 +729,7 @@ public void Var028 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -783,7 +783,7 @@ public void Var030 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -808,7 +808,7 @@ public void Var031 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -833,7 +833,7 @@ public void Var032 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -939,7 +939,7 @@ public void Var036 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BLOB"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); //} else { //@D1D //failed ("Didn't throw SQLException"); //@D1D //} //@D1D diff --git a/src/test/JD/RS/JDRSUpdateCharacterStream.java b/src/test/JD/RS/JDRSUpdateCharacterStream.java index 737dcc2..73cfcc8 100644 --- a/src/test/JD/RS/JDRSUpdateCharacterStream.java +++ b/src/test/JD/RS/JDRSUpdateCharacterStream.java @@ -13,29 +13,27 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; -import test.JD.JDWeirdReader; - import java.io.FileOutputStream; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.Date; -import java.sql.SQLException; - import java.sql.ResultSet; - +import java.sql.SQLException; import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; +import test.JD.JDWeirdReader; @@ -77,7 +75,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateCharacterStream (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateClob.java b/src/test/JD/RS/JDRSUpdateClob.java index 13f40f9..fc6213a 100644 --- a/src/test/JD/RS/JDRSUpdateClob.java +++ b/src/test/JD/RS/JDRSUpdateClob.java @@ -14,18 +14,9 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDLobTest; -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; -import test.JDLobTest.JDTestClob; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.sql.Clob; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.Date; import java.sql.ResultSet; @@ -33,6 +24,14 @@ import java.sql.Time; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDLobTest; +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -74,7 +73,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateClob (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateDB2Default.java b/src/test/JD/RS/JDRSUpdateDB2Default.java index 09850dd..66ad2e8 100644 --- a/src/test/JD/RS/JDRSUpdateDB2Default.java +++ b/src/test/JD/RS/JDRSUpdateDB2Default.java @@ -14,6 +14,13 @@ package test.JD.RS; +import java.io.FileOutputStream; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Hashtable; +import java.util.Vector; + import com.ibm.as400.access.AS400; import test.JDRSTest; @@ -21,13 +28,6 @@ import test.JDTestDriver; import test.JDTestcase; -import java.io.FileOutputStream; -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Hashtable; - /** @@ -73,7 +73,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateDB2Default (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -86,7 +86,7 @@ public JDRSUpdateDB2Default (AS400 systemObject, public JDRSUpdateDB2Default (AS400 systemObject, String testname, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -462,7 +462,7 @@ public void Var008() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Class[] argTypes = new Class[1]; + Class[] argTypes = new Class[1]; argTypes[0] = Class.forName("java.lang.String"); Object args[] = new Object[1]; args[0] = null; diff --git a/src/test/JD/RS/JDRSUpdateDBDefault.java b/src/test/JD/RS/JDRSUpdateDBDefault.java index 99fb982..e684d87 100644 --- a/src/test/JD/RS/JDRSUpdateDBDefault.java +++ b/src/test/JD/RS/JDRSUpdateDBDefault.java @@ -17,6 +17,7 @@ import java.io.FileOutputStream; import java.util.Hashtable; +import java.util.Vector; import com.ibm.as400.access.AS400; @@ -49,7 +50,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateDBDefault (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateDate.java b/src/test/JD/RS/JDRSUpdateDate.java index 4cb09e1..b63f0b8 100644 --- a/src/test/JD/RS/JDRSUpdateDate.java +++ b/src/test/JD/RS/JDRSUpdateDate.java @@ -14,20 +14,20 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; -import java.sql.Date; import java.sql.DataTruncation; +import java.sql.Date; import java.sql.ResultSet; import java.sql.Statement; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -69,7 +69,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateDate (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateDouble.java b/src/test/JD/RS/JDRSUpdateDouble.java index ebf8590..87918d1 100644 --- a/src/test/JD/RS/JDRSUpdateDouble.java +++ b/src/test/JD/RS/JDRSUpdateDouble.java @@ -14,13 +14,6 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; -import test.JVMInfo; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.sql.Connection; @@ -28,6 +21,13 @@ import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -55,6 +55,7 @@ public static void main(String args[]) throws Exception { // Private data. private static final String key_ = "JDRSUpdateDouble"; + private static final String key1_ = "JDRSUpdateDouble 1"; private static String select_ = "SELECT * FROM " + JDRSTest.RSTEST_UPDATE; @@ -68,7 +69,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateDouble (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -436,10 +437,10 @@ public void Var015() if (checkJdbc20 ()) { try { rs_.moveToInsertRow (); - rs_.updateString ("C_KEY", "JDRSUpdateDouble 1"); + rs_.updateString ("C_KEY", key1_); rs_.updateDouble ("C_DOUBLE", 98765); rs_.insertRow (); - JDRSTest.position (rs_, "JDRSUpdateDouble 1"); + JDRSTest.position (rs_, key1_); assertCondition (rs_.getDouble ("C_DOUBLE") == 98765); } catch (Exception e) { failed (e, "Unexpected Exception"); @@ -1384,22 +1385,14 @@ public void dfpRoundTest(String roundingMode, String table, double value, String * updateDouble -- set a DFP16 value (MAX_VALUE) */ public void Var055 () { - if (false) { - dfpTest(JDRSTest.RSTEST_DFP16, Double.MAX_VALUE, "179769313486231600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, Double.MAX_VALUE, "1.797693134862316E+308"); - } } /** * updateDouble -- set a DFP16 value (MIN_VALUE) */ public void Var056 () { - if (false) { - dfpTest(JDRSTest.RSTEST_DFP16, Double.MIN_VALUE, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, Double.MIN_VALUE, "4.9E-324"); - } } /** @@ -1552,11 +1545,7 @@ public void Var084 () { dfpRoundTest("round up", JDRSTest.RSTEST_DFP16, * updateDouble -- set a DFP34 value (MAX_VALUE) */ public void Var089 () { - if (false) { - dfpTest(JDRSTest.RSTEST_DFP34, Double.MAX_VALUE, "179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, Double.MAX_VALUE, "1.7976931348623157E+308"); - } } @@ -1564,11 +1553,7 @@ public void Var089 () { * updateDouble -- set a DFP34 value (MIN_VALUE) */ public void Var090 () { - if (false) { - dfpTest(JDRSTest.RSTEST_DFP34, Double.MIN_VALUE, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, Double.MIN_VALUE, "4.9E-324"); - } } /** @@ -1577,135 +1562,63 @@ public void Var090 () { * that accuracy. */ public void Var091 () { - if (false) { - dfpRoundTest("round half even", JDRSTest.RSTEST_DFP34, 5.552576577473519E-221, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005552576577473519"); - } else { dfpRoundTest("round half even", JDRSTest.RSTEST_DFP34, 5.552576577473519E-221, "5.552576577473519E-221"); - } } public void Var092 () { - if (false) { - dfpRoundTest("round half even", JDRSTest.RSTEST_DFP34, - -3.105034981303255E+231, "-3105034981303255000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpRoundTest("round half even", JDRSTest.RSTEST_DFP34, -3.105034981303255E+231, "-3.105034981303255E+231"); - } } public void Var093 () { - if (false) { - dfpRoundTest("round half up", JDRSTest.RSTEST_DFP34, - 5.552576577473519E-221, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005552576577473519"); - } else { dfpRoundTest("round half up", JDRSTest.RSTEST_DFP34, 5.552576577473519E-221, "5.552576577473519E-221"); - } } public void Var094 () { - if (false) { - dfpRoundTest("round half up", - JDRSTest.RSTEST_DFP34, - -3.105034981303255E+231, - "-3105034981303255000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpRoundTest("round half up", JDRSTest.RSTEST_DFP34, -3.105034981303255E+231, "-3.105034981303255E+231"); - } } public void Var095 () { - if (false) { - dfpRoundTest("round down", JDRSTest.RSTEST_DFP34, - 5.552576577473519E-221, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005552576577473519"); - } else { dfpRoundTest("round down", JDRSTest.RSTEST_DFP34, 5.552576577473519E-221, "5.552576577473519E-221"); - } } public void Var096 () { - if (false) { - dfpRoundTest("round down", JDRSTest.RSTEST_DFP34, - -3.105034981303255E+231, "-3105034981303255000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpRoundTest("round down", JDRSTest.RSTEST_DFP34, -3.105034981303255E+231, "-3.105034981303255E+231"); - } } public void Var097 () { - if (false) { - dfpRoundTest("round ceiling", JDRSTest.RSTEST_DFP34, - 5.552576577473519E-221, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005552576577473519"); - } else { dfpRoundTest("round ceiling", JDRSTest.RSTEST_DFP34, 5.552576577473519E-221, "5.552576577473519E-221"); - } } public void Var098 () { - if (false) { - dfpRoundTest("round ceiling", JDRSTest.RSTEST_DFP34, - -3.105034981303255E+231, "-3105034981303255000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpRoundTest("round ceiling", JDRSTest.RSTEST_DFP34, -3.105034981303255E+231, "-3.105034981303255E+231"); - } } public void Var099 () { - if (false) { - dfpRoundTest("round floor", JDRSTest.RSTEST_DFP34, - 5.552576577473519E-221, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005552576577473519"); - } else { dfpRoundTest("round floor", JDRSTest.RSTEST_DFP34, 5.552576577473519E-221, "5.552576577473519E-221"); - } } public void Var100 () { - if (false) { - dfpRoundTest("round floor", JDRSTest.RSTEST_DFP34, - -3.105034981303255E+231, "-3105034981303255000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpRoundTest("round floor", JDRSTest.RSTEST_DFP34, -3.105034981303255E+231, "-3.105034981303255E+231"); - } } public void Var101 () { - if (false) { - dfpRoundTest("round half down", JDRSTest.RSTEST_DFP34, - 5.552576577473519E-221, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005552576577473519"); - } else { dfpRoundTest("round half down", JDRSTest.RSTEST_DFP34, 5.552576577473519E-221, "5.552576577473519E-221"); - } } public void Var102 () { - if (false) { - - dfpRoundTest("round half down", JDRSTest.RSTEST_DFP34, - -3.105034981303255E+231, "-3105034981303255000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpRoundTest("round half down", JDRSTest.RSTEST_DFP34, -3.105034981303255E+231, "-3.105034981303255E+231"); - } } public void Var103 () { - if (false) { - dfpRoundTest("round up", JDRSTest.RSTEST_DFP34, - 5.552576577473519E-221, "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005552576577473519"); - } else { dfpRoundTest("round up", JDRSTest.RSTEST_DFP34, 5.552576577473519E-221, "5.552576577473519E-221"); - } } public void Var104 () { - if (false) { - dfpRoundTest("round up", JDRSTest.RSTEST_DFP34, - -3.105034981303255E+231, "-3105034981303255000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - } else { dfpRoundTest("round up", JDRSTest.RSTEST_DFP34, -3.105034981303255E+231, "-3.105034981303255E+231"); - } } @@ -1717,6 +1630,7 @@ public void Var105() if (checkJdbc20 ()) { if (checkBooleanSupport()) { try { + JDRSTest.position (rs_, key1_); JDRSTest.position (rs_, key_); rs_.updateDouble ("C_BOOLEAN", 12837443); rs_.updateRow (); diff --git a/src/test/JD/RS/JDRSUpdateFloat.java b/src/test/JD/RS/JDRSUpdateFloat.java index ba881f1..732f75e 100644 --- a/src/test/JD/RS/JDRSUpdateFloat.java +++ b/src/test/JD/RS/JDRSUpdateFloat.java @@ -14,13 +14,6 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; -import test.JVMInfo; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.sql.Connection; @@ -28,6 +21,13 @@ import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -56,6 +56,7 @@ public static void main(String args[]) throws Exception { // Private data. private static final String key_ = "JDRSUpdateFloat"; + private static final String key1_ = "JDRSUpdateFloat 1"; private static String select_ = "SELECT * FROM " + JDRSTest.RSTEST_UPDATE; @@ -69,7 +70,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateFloat (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -465,10 +466,10 @@ public void Var015() if (checkJdbc20 ()) { try { rs_.moveToInsertRow (); - rs_.updateString ("C_KEY", "JDRSUpdateFloat 1"); + rs_.updateString ("C_KEY", key1_); rs_.updateFloat ("C_FLOAT", 98765); rs_.insertRow (); - JDRSTest.position (rs_, "JDRSUpdateFloat 1"); + JDRSTest.position (rs_, key1_); assertCondition (rs_.getFloat ("C_FLOAT") == 98765); } catch (Exception e) { @@ -1378,22 +1379,14 @@ public void dfpRoundTest(String roundingMode, String table, float value, String */ public void Var055 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, Float.MAX_VALUE, "340282350000000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, Float.MAX_VALUE, "3.4028235E+38"); - } } /** * updateFloat -- set a DFP16 value (MIN_VALUE) */ public void Var056 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, Float.MIN_VALUE, "0.0000000000000000000000000000000000000000000014"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, Float.MIN_VALUE, "1.4E-45"); - } } /** @@ -1548,22 +1541,14 @@ public void Var084 () { dfpRoundTest("round up", JDRSTest.RSTEST_DFP16, * updateFloat -- set a DFP34 value (MAX_VALUE) */ public void Var089 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, Float.MAX_VALUE, "340282350000000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, Float.MAX_VALUE, "3.4028235E+38"); - } } /** * updateFloat -- set a DFP34 value (MIN_VALUE) */ public void Var090 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP34, Float.MIN_VALUE, "0.0000000000000000000000000000000000000000000014"); - } else { dfpTest(JDRSTest.RSTEST_DFP34, Float.MIN_VALUE, "1.4E-45"); - } } /** @@ -1698,6 +1683,7 @@ public void Var119() if (checkJdbc20 ()) { if (checkBooleanSupport()) { try { + JDRSTest.position (rs_, key1_); JDRSTest.position (rs_, key_); rs_.updateFloat ("C_BOOLEAN", 428372); rs_.updateRow (); diff --git a/src/test/JD/RS/JDRSUpdateInt.java b/src/test/JD/RS/JDRSUpdateInt.java index ab4972a..23e39c9 100644 --- a/src/test/JD/RS/JDRSUpdateInt.java +++ b/src/test/JD/RS/JDRSUpdateInt.java @@ -14,12 +14,6 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.sql.Connection; @@ -27,6 +21,13 @@ import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -68,7 +69,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateInt (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateLong.java b/src/test/JD/RS/JDRSUpdateLong.java index ed67b3b..7c0a733 100644 --- a/src/test/JD/RS/JDRSUpdateLong.java +++ b/src/test/JD/RS/JDRSUpdateLong.java @@ -14,19 +14,19 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -68,7 +68,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateLong (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateNCharacterStream.java b/src/test/JD/RS/JDRSUpdateNCharacterStream.java index a937071..3388c4f 100644 --- a/src/test/JD/RS/JDRSUpdateNCharacterStream.java +++ b/src/test/JD/RS/JDRSUpdateNCharacterStream.java @@ -14,20 +14,11 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDReflectionUtil; -import test.JDTestDriver; -import test.JDTestcase; -import test.JD.JDWeirdReader; - import java.io.FileOutputStream; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.Date; import java.sql.ResultSet; @@ -36,6 +27,15 @@ import java.sql.Time; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDReflectionUtil; +import test.JDTestDriver; +import test.JDTestcase; +import test.JD.JDWeirdReader; @@ -77,7 +77,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateNCharacterStream (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateNClob.java b/src/test/JD/RS/JDRSUpdateNClob.java index 21f7b8b..2262efc 100644 --- a/src/test/JD/RS/JDRSUpdateNClob.java +++ b/src/test/JD/RS/JDRSUpdateNClob.java @@ -13,16 +13,8 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDReflectionUtil; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.Date; import java.sql.ResultSet; @@ -31,6 +23,14 @@ import java.sql.Time; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDReflectionUtil; +import test.JDTestDriver; +import test.JDTestcase; @@ -72,7 +72,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateNClob (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -445,9 +445,8 @@ public void Var012() try { JDRSTest.position (rs_, key_); - Class[] argClasses = new Class[2]; + Class[] argClasses = new Class[2]; argClasses[0] = String.class; - // TODO.. This will need to change when really running JDBC40 try { argClasses[1] = Class.forName("java.sql.NClob"); } catch (Exception e) { diff --git a/src/test/JD/RS/JDRSUpdateNString.java b/src/test/JD/RS/JDRSUpdateNString.java index a678dc6..b451b2c 100644 --- a/src/test/JD/RS/JDRSUpdateNString.java +++ b/src/test/JD/RS/JDRSUpdateNString.java @@ -1,25 +1,24 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDJobName; -import test.JDRSTest; -import test.JDReflectionUtil; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.Date; +import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.Statement; -import java.sql.PreparedStatement; import java.sql.Time; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDJobName; +import test.JDRSTest; +import test.JDReflectionUtil; +import test.JDTestDriver; +import test.JDTestcase; @@ -48,6 +47,7 @@ public static void main(String args[]) throws Exception { // Private data. private static final String key_ = "JDRSUpdateNString"; + private static final String key1_= "JDRSUpdateNString 1"; private static String select_ = "SELECT * FROM " + JDRSTest.RSTEST_UPDATE; private Statement statement_; @@ -60,7 +60,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateNString (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -521,10 +521,10 @@ public void Var016() try { rs_.moveToInsertRow (); - JDReflectionUtil.callMethod_V(rs_, "updateNString", "C_KEY", "JDRSUpdateNString 1"); + JDReflectionUtil.callMethod_V(rs_, "updateNString", "C_KEY", key1_); JDReflectionUtil.callMethod_V(rs_, "updateNString", "C_VARCHAR_50", "Foreign keys"); rs_.insertRow (); - JDRSTest.position (rs_, "JDRSUpdateNString 1"); + JDRSTest.position (rs_, key1_); assertCondition (rs_.getString ("C_VARCHAR_50").equals ("Foreign keys")); } catch(Exception e) @@ -2339,6 +2339,7 @@ public void testBoolean(String inString, String outString) { if (checkJdbc40()) { if (checkBooleanSupport()) { try { + JDRSTest.position(rs_, key1_); JDRSTest.position(rs_, key_); JDReflectionUtil.callMethod_V(rs_, "updateNString", "C_BOOLEAN", inString); diff --git a/src/test/JD/RS/JDRSUpdateNull.java b/src/test/JD/RS/JDRSUpdateNull.java index 86032d9..fb08716 100644 --- a/src/test/JD/RS/JDRSUpdateNull.java +++ b/src/test/JD/RS/JDRSUpdateNull.java @@ -1,23 +1,23 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.sql.Blob; import java.sql.Clob; -import java.sql.Connection; import java.sql.Date; import java.sql.ResultSet; import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -59,7 +59,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateNull (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateObject.java b/src/test/JD/RS/JDRSUpdateObject.java index f0fe3a1..9385e5e 100644 --- a/src/test/JD/RS/JDRSUpdateObject.java +++ b/src/test/JD/RS/JDRSUpdateObject.java @@ -1,18 +1,6 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; -// import com.ibm.as400.access.AS400JDBCDataSource; - -import test.JDLobTest; -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; -import test.JTOpenTestEnvironment; -import test.JVMInfo; -import test.JDLobTest.JDTestBlob; -import test.JDLobTest.JDTestClob; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.sql.Blob; @@ -28,6 +16,14 @@ import java.sql.Timestamp; import java.sql.Types; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; +// import com.ibm.as400.access.AS400JDBCDataSource; + +import test.JDLobTest; +import test.JDRSTest; +import test.JDTestcase; @@ -82,7 +78,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateObject (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -1861,7 +1857,7 @@ public void Var064 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BLOB"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); @@ -1891,7 +1887,7 @@ public void Var065 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BLOB"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); @@ -1959,7 +1955,7 @@ public void Var068 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time t = new Time (7, 36, 0); + Time t = Time.valueOf ("07:36:00"); rs_.updateObject ("C_TIME", t); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -2347,39 +2343,19 @@ public void dfpTest(String table, Object value, String expected, String expected public void Var096 () { dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456", "-1234567890123456");} public void Var097 () { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456","1234567890123456");} public void Var098 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","1.234567890123456E+43"); - } } public void Var099 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","1.234567890123456E+43"); - } } public void Var100 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","1.234567890123456E+43"); - } } public void Var101 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","1.234567890123456E+43"); - } } public void Var102 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-1.234567890123456E+43"); - } } public void Var103 () { dfpTest(JDRSTest.RSTEST_DFP16, "1E0", "1");} @@ -2392,39 +2368,19 @@ public void Var102 () { public void Var109 () { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456"), "-1234567890123456");} public void Var110 () { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456"),"1234567890123456");} public void Var111 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E28"),"12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E28"),"1.234567890123456E+43"); - } } public void Var112 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E+28"), "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E+28"),"1.234567890123456E+43"); - } } public void Var113 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+123456789012345.6E+29"), "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+123456789012345.6E+29"),"1.234567890123456E+43"); - } } public void Var114 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+0.01234567890123456E+45"), "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+0.01234567890123456E+45"),"1.234567890123456E+43"); - } } public void Var115 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456E28"), "-12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456E28"),"-1.234567890123456E+43"); - } } public void Var116 () { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("1E0"), "1");} @@ -2437,12 +2393,8 @@ public void Var115 () { public void Var121 () { dfpTest(JDRSTest.RSTEST_DFP16, new Float(Float.POSITIVE_INFINITY), "Infinity");} public void Var122 () { dfpTest(JDRSTest.RSTEST_DFP16, new Float(Float.NEGATIVE_INFINITY), "-Infinity");} public void Var123 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new Float(-1234567890123456.0), "-1234567950000000"); - } else { /* with the new native PASE support, this comes back with the zeros*/ dfpTest(JDRSTest.RSTEST_DFP16, new Float(-1234567890123456.0), "-1.23456795E+15", "-1234567950000000"); - } } public void Var124 () { dfpTest(JDRSTest.RSTEST_DFP16, new Double(4533.43f), "4533.43017578125"); } public void Var125 () { dfpTest(JDRSTest.RSTEST_DFP16, new Double(Double.NaN), "NaN");} @@ -2838,39 +2790,19 @@ public void dfpTestCommaSeparator(String table, Object value, String expected, S public void Var144 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456", "-1234567890123456");} public void Var145 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456","1234567890123456");} public void Var146 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","1,234567890123456E+43"); - } } public void Var147 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","1,234567890123456E+43"); - } } public void Var148 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","1,234567890123456E+43"); - } } public void Var149 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","1,234567890123456E+43"); - } } public void Var150 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-1,234567890123456E+43"); - } } public void Var151 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "1E0", "1");} @@ -2883,39 +2815,19 @@ public void Var150 () { public void Var157 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456"), "-1234567890123456");} public void Var158 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456"),"1234567890123456");} public void Var159 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E28"),"12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E28"),"1,234567890123456E+43"); - } } public void Var160 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E+28"), "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E+28"),"1,234567890123456E+43"); - } } public void Var161 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+123456789012345.6E+29"), "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+123456789012345.6E+29"),"1,234567890123456E+43"); - } } public void Var162 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+0.01234567890123456E+45"), "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+0.01234567890123456E+45"),"1,234567890123456E+43"); - } } public void Var163 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456E28"), "-12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456E28"),"-1,234567890123456E+43"); - } } public void Var164 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("1E0"), "1");} @@ -2928,12 +2840,7 @@ public void Var163 () { public void Var169 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Float(Float.POSITIVE_INFINITY), "Infinity");} public void Var170 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Float(Float.NEGATIVE_INFINITY), "-Infinity");} public void Var171 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Float(-1234567890123456.0), "-1234567950000000"); - } else { - /* with the new native PASE support, this comes back with the zeros*/ dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Float(-1234567890123456.0), "-1,23456795E+15", "-1234567950000000"); - } } public void Var172 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Double(4533.43f), "4533,43017578125"); } public void Var173 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Double(Double.NaN), "NaN");} diff --git a/src/test/JD/RS/JDRSUpdateObjectSQLType.java b/src/test/JD/RS/JDRSUpdateObjectSQLType.java index 2fba871..221b008 100644 --- a/src/test/JD/RS/JDRSUpdateObjectSQLType.java +++ b/src/test/JD/RS/JDRSUpdateObjectSQLType.java @@ -14,18 +14,6 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; -// import com.ibm.as400.access.AS400JDBCDataSource; - -import test.JDLobTest; -import test.JDRSTest; -import test.JDReflectionUtil; -import test.JDTestDriver; -import test.JDTestcase; -import test.JVMInfo; -import test.JDLobTest.JDTestBlob; -import test.JDLobTest.JDTestClob; - import java.io.FileOutputStream; import java.math.BigDecimal; import java.sql.Blob; @@ -41,6 +29,15 @@ import java.sql.Timestamp; import java.sql.Types; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; +// import com.ibm.as400.access.AS400JDBCDataSource; + +import test.JDLobTest; +import test.JDRSTest; +import test.JDReflectionUtil; +import test.JDTestcase; @@ -96,7 +93,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateObjectSQLType (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -563,7 +560,7 @@ public void Var012() JDRSTest.position (rs_, key_); // JDReflectionUtil.callMethod_V(rs_,"updateObject","C_VARCHAR_50", null, getSQLType(Types.VARCHAR)); - Class[] argClasses = new Class[3]; + Class[] argClasses = new Class[3]; argClasses[0] = Class.forName("java.lang.String"); argClasses[1] = Class.forName("java.lang.Object"); argClasses[2] = Class.forName("java.sql.SQLType"); @@ -1895,7 +1892,7 @@ public void Var064 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BLOB"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); @@ -1925,7 +1922,7 @@ public void Var065 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BLOB"); rs2.close (); - assertCondition (isEqual (v, ba)); + assertCondition (areEqual (v, ba)); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); @@ -1994,7 +1991,7 @@ public void Var068 () if (checkJdbc42 ()) { try { JDRSTest.position (rs_, key_); - Time t = new Time (7, 36, 0); + Time t = Time.valueOf("07:36:00"); JDReflectionUtil.callMethod_V(rs_,"updateObject","C_TIME", t, getSQLType(Types.TIME)); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -2345,7 +2342,7 @@ public void dfpTest(String table, Object value, String expected, String expected rs.next(); // JDReflectionUtil.callMethod_V(rs,"updateObject",1, value, getSQLType(Types.OTHER)); - Class[] argClasses = new Class[3]; + Class[] argClasses = new Class[3]; argClasses[0] = Integer.TYPE; argClasses[1] = Class.forName("java.lang.Object"); argClasses[2] = Class.forName("java.sql.SQLType"); @@ -2400,39 +2397,19 @@ public void dfpTest(String table, Object value, String expected, String expected public void Var096 () { dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456", "-1234567890123456");} public void Var097 () { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456","1234567890123456");} public void Var098 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","1.234567890123456E+43"); - } } public void Var099 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","1.234567890123456E+43"); - } } public void Var100 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","1.234567890123456E+43"); - } } public void Var101 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","1.234567890123456E+43"); - } } public void Var102 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-1.234567890123456E+43"); - } } public void Var103 () { dfpTest(JDRSTest.RSTEST_DFP16, "1E0", "1");} @@ -2445,39 +2422,19 @@ public void Var102 () { public void Var109 () { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456"), "-1234567890123456");} public void Var110 () { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456"),"1234567890123456");} public void Var111 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E28"),"12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E28"),"1.234567890123456E+43"); - } } public void Var112 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E+28"), "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E+28"),"1.234567890123456E+43"); - } } public void Var113 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+123456789012345.6E+29"), "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+123456789012345.6E+29"),"1.234567890123456E+43"); - } } public void Var114 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+0.01234567890123456E+45"), "12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("+0.01234567890123456E+45"),"1.234567890123456E+43"); - } } public void Var115 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456E28"), "-12345678901234560000000000000000000000000000"); - } else { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456E28"),"-1.234567890123456E+43"); - } } public void Var116 () { dfpTest(JDRSTest.RSTEST_DFP16, new BigDecimal("1E0"), "1");} @@ -2490,12 +2447,8 @@ public void Var115 () { public void Var121 () { dfpTest(JDRSTest.RSTEST_DFP16, new Float(Float.POSITIVE_INFINITY), "Infinity");} public void Var122 () { dfpTest(JDRSTest.RSTEST_DFP16, new Float(Float.NEGATIVE_INFINITY), "-Infinity");} public void Var123 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTest(JDRSTest.RSTEST_DFP16, new Float(-1234567890123456.0), "-1234567950000000"); - } else { /* with the new native PASE support, this comes back with the zeros*/ dfpTest(JDRSTest.RSTEST_DFP16, new Float(-1234567890123456.0), "-1.23456795E+15", "-1234567950000000"); - } } public void Var124 () { dfpTest(JDRSTest.RSTEST_DFP16, new Double(4533.43f), "4533.43017578125"); } public void Var125 () { dfpTest(JDRSTest.RSTEST_DFP16, new Double(Double.NaN), "NaN");} @@ -2863,7 +2816,7 @@ public void dfpTestCommaSeparator(String table, Object value, String expected, S ResultSet rs = s.executeQuery("SELECT * FROM " + table + " FOR UPDATE "); rs.next(); // JDReflectionUtil.callMethod_V(rs,"updateObject",1, value, getSQLType(Types.OTHER)); - Class[] argClasses = new Class[3]; + Class[] argClasses = new Class[3]; argClasses[0] = Integer.TYPE; argClasses[1] = Class.forName("java.lang.Object"); argClasses[2] = Class.forName("java.sql.SQLType"); @@ -2901,39 +2854,19 @@ public void dfpTestCommaSeparator(String table, Object value, String expected, S public void Var144 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456", "-1234567890123456");} public void Var145 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456","1234567890123456");} public void Var146 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E28","1,234567890123456E+43"); - } } public void Var147 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+1234567890123456E+28","1,234567890123456E+43"); - } } public void Var148 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+123456789012345.6E+29","1,234567890123456E+43"); - } } public void Var149 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "+0.01234567890123456E+45","1,234567890123456E+43"); - } } public void Var150 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "-1234567890123456E28","-1,234567890123456E+43"); - } } public void Var151 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, "1E0", "1");} @@ -2946,39 +2879,19 @@ public void Var150 () { public void Var157 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456"), "-1234567890123456");} public void Var158 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456"),"1234567890123456");} public void Var159 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E28"),"12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E28"),"1,234567890123456E+43"); - } } public void Var160 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E+28"), "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+1234567890123456E+28"),"1,234567890123456E+43"); - } } public void Var161 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+123456789012345.6E+29"), "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+123456789012345.6E+29"),"1,234567890123456E+43"); - } } public void Var162 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+0.01234567890123456E+45"), "12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("+0.01234567890123456E+45"),"1,234567890123456E+43"); - } } public void Var163 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456E28"), "-12345678901234560000000000000000000000000000"); - } else { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("-1234567890123456E28"),"-1,234567890123456E+43"); - } } public void Var164 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new BigDecimal("1E0"), "1");} @@ -2991,12 +2904,8 @@ public void Var163 () { public void Var169 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Float(Float.POSITIVE_INFINITY), "Infinity");} public void Var170 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Float(Float.NEGATIVE_INFINITY), "-Infinity");} public void Var171 () { - if ((getDriver() == JDTestDriver.DRIVER_NATIVE || isToolboxDriver()) && false) { - dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Float(-1234567890123456.0), "-1234567950000000"); - } else { /* with the new native PASE support, this comes back with the zeros*/ dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Float(-1234567890123456.0), "-1,23456795E+15", "-1234567950000000"); - } } public void Var172 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Double(4533.43f), "4533,43017578125"); } public void Var173 () { dfpTestCommaSeparator(JDRSTest.RSTEST_DFP16, new Double(Double.NaN), "NaN");} diff --git a/src/test/JD/RS/JDRSUpdateRow.java b/src/test/JD/RS/JDRSUpdateRow.java index 861ea60..4dd3e58 100644 --- a/src/test/JD/RS/JDRSUpdateRow.java +++ b/src/test/JD/RS/JDRSUpdateRow.java @@ -14,19 +14,20 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; import java.sql.Connection; import java.sql.DriverManager; +import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; -import java.sql.PreparedStatement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -74,7 +75,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateRow (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateRowId.java b/src/test/JD/RS/JDRSUpdateRowId.java index d574ab4..b66a95a 100644 --- a/src/test/JD/RS/JDRSUpdateRowId.java +++ b/src/test/JD/RS/JDRSUpdateRowId.java @@ -14,6 +14,13 @@ package test.JD.RS; +import java.io.FileOutputStream; +import java.sql.DataTruncation; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.Hashtable; +import java.util.Vector; + import com.ibm.as400.access.AS400; import test.JDRSTest; @@ -21,13 +28,6 @@ import test.JDTestDriver; import test.JDTestcase; -import java.io.FileOutputStream; -import java.sql.Connection; -import java.sql.DataTruncation; -import java.sql.ResultSet; -import java.sql.Statement; -import java.util.Hashtable; - /** @@ -69,7 +69,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateRowId (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -297,7 +297,7 @@ public void Var007() JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba), baseAdded); + assertCondition (areEqual (v, ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -389,7 +389,7 @@ public void Var011() JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba), baseAdded); + assertCondition (areEqual (v, ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -415,7 +415,7 @@ public void Var012() try { JDRSTest.position (rs_, key_); - Class[] argTypes = new Class[2]; + Class[] argTypes = new Class[2]; argTypes[0] = Class.forName("java.lang.String"); try { argTypes[1] = Class.forName("java.sql.RowId"); @@ -454,7 +454,7 @@ public void Var013() JDRSTest.position (rs_, key_); byte[] ba = new byte[] { (byte) 0, (byte) 1, (byte) -1, (byte) 2, (byte) -2 }; JDReflectionUtil.callMethod_V(rs_, "updateRowId", "C_VARBINARY_20", createRowId(ba)); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba), baseAdded); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -483,7 +483,7 @@ public void Var014() byte[] ba = new byte[] { (byte) 0, (byte) 56, (byte) 1, (byte) -1, (byte) 2, (byte) -2 }; JDReflectionUtil.callMethod_V(rs_, "updateRowId", "C_VARBINARY_20", createRowId(ba)); rs_.updateRow (); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba), baseAdded); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -515,7 +515,7 @@ public void Var015() rs_.beforeFirst (); JDRSTest.position (rs_, key_); byte[] v = rs_.getBytes ("C_VARBINARY_20"); - assertCondition (isEqual (ba, v), baseAdded); + assertCondition (areEqual (ba, v), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -547,7 +547,7 @@ public void Var016() JDReflectionUtil.callMethod_V(rs_, "updateRowId", "C_VARBINARY_20", createRowId(ba)); rs_.insertRow (); JDRSTest.position (rs_, "JDRSUpdateRowId 1"); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba), baseAdded); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -574,7 +574,7 @@ public void Var017() rs_.moveToInsertRow (); byte[] ba = new byte[] { (byte) 121, (byte) 0, (byte) 56, (byte) -1, (byte) 2, (byte) -2 }; JDReflectionUtil.callMethod_V(rs_, "updateRowId", "C_VARBINARY_20", createRowId(ba)); - assertCondition (isEqual (rs_.getBytes ("C_VARBINARY_20"), ba), baseAdded); + assertCondition (areEqual (rs_.getBytes ("C_VARBINARY_20"), ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -798,7 +798,7 @@ public void Var028 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba), baseAdded); + assertCondition (areEqual (v, ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -864,7 +864,7 @@ public void Var030 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba), baseAdded); + assertCondition (areEqual (v, ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -895,7 +895,7 @@ public void Var031 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba), baseAdded); + assertCondition (areEqual (v, ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -926,7 +926,7 @@ public void Var032 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_VARBINARY_20"); rs2.close (); - assertCondition (isEqual (v, ba), baseAdded); + assertCondition (areEqual (v, ba), baseAdded); } catch (Exception e) { //toolbox does not support rowid on this type @@ -1044,7 +1044,7 @@ public void Var036 () JDRSTest.position (rs2, key_); byte[] v = rs2.getBytes ("C_BLOB"); rs2.close (); - assertCondition (isEqual (v, ba), baseAdded); + assertCondition (areEqual (v, ba), baseAdded); //} else { //@D1D //failed ("Didn't throw SQLException"+baseAdded); //@D1D //} //@D1D diff --git a/src/test/JD/RS/JDRSUpdateSQLXML.java b/src/test/JD/RS/JDRSUpdateSQLXML.java index 6398dfc..3588f38 100644 --- a/src/test/JD/RS/JDRSUpdateSQLXML.java +++ b/src/test/JD/RS/JDRSUpdateSQLXML.java @@ -14,6 +14,13 @@ package test.JD.RS; +import java.io.FileOutputStream; +/* import java.sql.DataTruncation; */ +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.Hashtable; +import java.util.Vector; + import com.ibm.as400.access.AS400; import test.JDRSTest; @@ -22,13 +29,6 @@ import test.JDTestcase; import test.JD.JDTestUtilities; -import java.io.FileOutputStream; -import java.sql.Connection; -/* import java.sql.DataTruncation; */ -import java.sql.ResultSet; -import java.sql.Statement; -import java.util.Hashtable; - /** @@ -74,7 +74,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateSQLXML (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -544,7 +544,7 @@ public void Var012() { rsXML_.first(); - Class[] argTypes = new Class[2]; + Class[] argTypes = new Class[2]; argTypes[0] = Integer.TYPE; try { argTypes[1] = Class.forName("java.sql.SQLXML"); diff --git a/src/test/JD/RS/JDRSUpdateShort.java b/src/test/JD/RS/JDRSUpdateShort.java index e55ac5a..f4d6fc4 100644 --- a/src/test/JD/RS/JDRSUpdateShort.java +++ b/src/test/JD/RS/JDRSUpdateShort.java @@ -13,18 +13,18 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestcase; - import java.io.FileOutputStream; import java.math.BigDecimal; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.ResultSet; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestcase; @@ -66,7 +66,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateShort (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSUpdateString.java b/src/test/JD/RS/JDRSUpdateString.java index 2d228f8..71d5507 100644 --- a/src/test/JD/RS/JDRSUpdateString.java +++ b/src/test/JD/RS/JDRSUpdateString.java @@ -20,7 +20,6 @@ import test.JDRSTest; import test.JDTestDriver; import test.JDTestcase; -import test.JVMInfo; import java.io.FileOutputStream; import java.math.BigDecimal; @@ -28,12 +27,12 @@ import java.sql.DataTruncation; import java.sql.Date; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.Statement; import java.sql.PreparedStatement; import java.sql.Time; import java.sql.Timestamp; -import java.util.Hashtable; +import java.util.Hashtable; +import java.util.Vector; @@ -62,6 +61,7 @@ public static void main(String args[]) throws Exception { // Private data. private static final String key_ = "JDRSUpdateString"; + private static final String key1_ = "JDRSUpdateString 1"; private static String select_ = "SELECT * FROM " + JDRSTest.RSTEST_UPDATE; private Statement statement_; @@ -75,7 +75,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateString (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -534,10 +534,10 @@ public void Var016() try { rs_.moveToInsertRow (); - rs_.updateString ("C_KEY", "JDRSUpdateString 1"); + rs_.updateString ("C_KEY", key1_); rs_.updateString ("C_VARCHAR_50", "Foreign keys"); rs_.insertRow (); - JDRSTest.position (rs_, "JDRSUpdateString 1"); + JDRSTest.position (rs_, key1_); assertCondition (rs_.getString ("C_VARCHAR_50").equals ("Foreign keys")); } catch(Exception e) @@ -2649,6 +2649,9 @@ public void updateBoolean(String inString, String outString) { if (checkJdbc20()) { if (checkBooleanSupport()) { try { + // A previous commit could have lost lock on position. + // We need to make sure that server knows we want to re-obtain the lock + JDRSTest.position(rs_,key1_); JDRSTest.position(rs_, key_); rs_.updateString("C_BOOLEAN", inString); rs_.updateRow(); diff --git a/src/test/JD/RS/JDRSUpdateTime.java b/src/test/JD/RS/JDRSUpdateTime.java index a4b343f..6daf354 100644 --- a/src/test/JD/RS/JDRSUpdateTime.java +++ b/src/test/JD/RS/JDRSUpdateTime.java @@ -13,19 +13,19 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.DataTruncation; import java.sql.ResultSet; import java.sql.Statement; import java.sql.Time; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -67,7 +67,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateTime (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -148,7 +148,7 @@ public void Var001() + JDRSTest.RSTEST_UPDATE + " FOR UPDATE"); rs.next (); rs.close (); - rs.updateTime ("C_TIME", new Time (10,01,12)); + rs.updateTime ("C_TIME", Time.valueOf("10:01:12")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -172,7 +172,7 @@ public void Var002() ResultSet rs = s.executeQuery ("SELECT * FROM " + JDRSTest.RSTEST_UPDATE); rs.next (); - rs.updateTime ("C_TIME", new Time (4,6,23)); + rs.updateTime ("C_TIME", Time.valueOf("04:06:23")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -187,12 +187,12 @@ public void Var002() updateTime() - Should throw exception when cursor is not pointing to a row. **/ - public void Var003() + public void Var003() { if (checkJdbc20 ()) { try { JDRSTest.position (rs_, null); - rs_.updateTime ("C_TIME", new Time (8,7,23)); + rs_.updateTime ("C_TIME", Time.valueOf("08:07:23")); rs_.updateRow(); failed ("Didn't throw SQLException"); } @@ -213,7 +213,7 @@ public void Var004() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime (100, new Time (19,3,12)); + rs_.updateTime (100, Time.valueOf("19:03:12")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -233,7 +233,7 @@ public void Var005() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime (0, new Time (23,34,23)); + rs_.updateTime (0, Time.valueOf("23:34:23")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -253,7 +253,7 @@ public void Var006() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime (-1, new Time (14,24,9)); + rs_.updateTime (-1, Time.valueOf("14:24:09")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -272,7 +272,7 @@ public void Var007() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (19,22,40); + Time d = Time.valueOf("19:22:40"); rs_.updateTime (20, d); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -301,7 +301,7 @@ public void Var008() } else { try { JDRSTest.position (rs_, key_); - rs_.updateTime (null, new Time (19,49,59)); + rs_.updateTime (null, Time.valueOf("19:49:59")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -321,7 +321,7 @@ public void Var009() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("", new Time (9,59,34)); + rs_.updateTime ("", Time.valueOf("09:59:34")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -341,7 +341,7 @@ public void Var010() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("INVALID", new Time (15,9,34)); + rs_.updateTime ("INVALID", Time.valueOf("15:09:34")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -360,7 +360,7 @@ public void Var011() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (10,8,0); + Time d = Time.valueOf("10:08:00"); rs_.updateTime ("C_TIME", d); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -412,7 +412,7 @@ public void Var013() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (14,04,00); + Time d = Time.valueOf("14:04:00"); rs_.updateTime ("C_TIME", d); Time v = rs_.getTime ("C_TIME"); assertCondition (v.toString ().equals (d.toString ())); @@ -435,7 +435,7 @@ public void Var014() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (6,4,8); + Time d = Time.valueOf("06:04:08"); rs_.updateTime ("C_TIME", d); rs_.updateRow (); Time v = rs_.getTime ("C_TIME"); @@ -459,7 +459,7 @@ public void Var015() if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (4,8,30); + Time d = Time.valueOf("04:08:30"); rs_.updateTime ("C_TIME", d); rs_.updateRow (); rs_.beforeFirst (); @@ -486,7 +486,7 @@ public void Var016() try { rs_.moveToInsertRow (); rs_.updateString ("C_KEY", "JDRSUpdateTime 1"); - Time d = new Time (10,8,30); + Time d = Time.valueOf("10:08:30"); rs_.updateTime ("C_Time", d); rs_.insertRow (); JDRSTest.position (rs_, "JDRSUpdateTime 1"); @@ -510,7 +510,7 @@ public void Var017() if (checkJdbc20 ()) { try { rs_.moveToInsertRow (); - Time d = new Time (4,8,05); + Time d = Time.valueOf("04:08:05"); rs_.updateTime ("C_TIME", d); Time v = rs_.getTime ("C_TIME"); assertCondition (v.toString ().equals (d.toString ())); @@ -532,7 +532,7 @@ public void Var018() try { JDRSTest.position (rs_, "DUMMY_ROW"); rs_.deleteRow (); - rs_.updateTime ("C_TIME", new Time (14,34,5)); + rs_.updateTime ("C_TIME", Time.valueOf("14:34:05")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -550,7 +550,7 @@ public void Var019 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_SMALLINT", new Time (12,34,19)); + rs_.updateTime ("C_SMALLINT", Time.valueOf("12:34:19")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -569,7 +569,7 @@ public void Var020 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_INTEGER", new Time (12,51,49)); + rs_.updateTime ("C_INTEGER", Time.valueOf("12:51:49")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -588,7 +588,7 @@ public void Var021 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_REAL", new Time (14,44,19)); + rs_.updateTime ("C_REAL", Time.valueOf("14:44:19")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -607,7 +607,7 @@ public void Var022 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_FLOAT", new Time (18,41,5)); + rs_.updateTime ("C_FLOAT", Time.valueOf("18:41:05")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -626,7 +626,7 @@ public void Var023 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_DOUBLE", new Time (3,41,5)); + rs_.updateTime ("C_DOUBLE", Time.valueOf("03:41:05")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -645,7 +645,7 @@ public void Var024 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_DECIMAL_105", new Time (12,34,49)); + rs_.updateTime ("C_DECIMAL_105", Time.valueOf("12:34:49")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -664,7 +664,7 @@ public void Var025 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_NUMERIC_105", new Time (11,9,49)); + rs_.updateTime ("C_NUMERIC_105", Time.valueOf("1:0,:,49")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -685,7 +685,7 @@ public void Var026 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (10,8,0); + Time d = Time.valueOf("10:08:00"); rs_.updateTime ("C_CHAR_50", d); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -715,7 +715,7 @@ public void Var027 () try { JDRSTest.position (rs_, key_); expectedColumn = rs_.findColumn ("C_CHAR_1"); - Time d = new Time (8,0,0); + Time d = Time.valueOf("08:00:00"); rs_.updateTime ("C_CHAR_1", d); rs_.updateRow (); failed ("Didn't throw SQLException"); @@ -744,7 +744,7 @@ public void Var028 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (9,22,40); + Time d = Time.valueOf("09:22:40"); rs_.updateTime ("C_VARCHAR_50", d); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -772,7 +772,7 @@ public void Var029 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_BINARY_20", new Time (21,32,34)); + rs_.updateTime ("C_BINARY_20", Time.valueOf("21:32:34")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -791,7 +791,7 @@ public void Var030 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_VARBINARY_20", new Time (21,33,34)); + rs_.updateTime ("C_VARBINARY_20", Time.valueOf("21:33:34")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -811,7 +811,7 @@ public void Var031 () if (checkLobSupport ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_CLOB", new Time (21,33,34)); + rs_.updateTime ("C_CLOB", Time.valueOf("21:33:34")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -832,7 +832,7 @@ public void Var032 () if (checkLobSupport ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_DBCLOB", new Time (23,3,34)); + rs_.updateTime ("C_DBCLOB", Time.valueOf("23:03:34")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -853,7 +853,7 @@ public void Var033 () if (checkLobSupport ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_BLOB", new Time (22,32,34)); + rs_.updateTime ("C_BLOB", Time.valueOf("22:32:34")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -873,7 +873,7 @@ public void Var034 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (1,9,22); + Time d = Time.valueOf("01:09:22"); rs_.updateTime ("C_DATE", d); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -898,7 +898,7 @@ public void Var035 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (21,33,24); + Time d = Time.valueOf("21:33:24"); rs_.updateTime ("C_TIME", d); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -923,7 +923,7 @@ public void Var036 () if (checkJdbc20 ()) { try { JDRSTest.position (rs_, key_); - Time d = new Time (19,22,40); + Time d = Time.valueOf("19:22:40"); rs_.updateTime ("C_TIMESTAMP", d); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); @@ -954,7 +954,7 @@ public void Var037 () /* try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_DATALINK", new Time (21,32,34)); + rs_.updateTime ("C_DATALINK", Time.valueOf("21:32:34")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -978,7 +978,7 @@ public void Var038 () if (checkLobSupport ()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_DISTINCT", new Time (13,23,4)); + rs_.updateTime ("C_DISTINCT", Time.valueOf("13:23:04")); rs_.updateRow (); ResultSet rs2 = statement2_.executeQuery (select_); JDRSTest.position (rs2, key_); @@ -1007,7 +1007,7 @@ public void Var039() if (checkBigintSupport()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_BIGINT", new Time (12,51,49)); + rs_.updateTime ("C_BIGINT", Time.valueOf("12:51:49")); failed ("Didn't throw SQLException"); } catch (Exception e) { @@ -1068,7 +1068,7 @@ public void Var042() if (checkBooleanSupport()) { try { JDRSTest.position (rs_, key_); - rs_.updateTime ("C_BOOLEAN", new Time (12,51,49)); + rs_.updateTime ("C_BOOLEAN", Time.valueOf("12:51:49")); failed ("Didn't throw SQLException"); } catch (Exception e) { diff --git a/src/test/JD/RS/JDRSUpdateTimestamp.java b/src/test/JD/RS/JDRSUpdateTimestamp.java index 975c8c9..0c1f088 100644 --- a/src/test/JD/RS/JDRSUpdateTimestamp.java +++ b/src/test/JD/RS/JDRSUpdateTimestamp.java @@ -14,21 +14,21 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; -import java.sql.Date; import java.sql.DataTruncation; +import java.sql.Date; import java.sql.ResultSet; import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -72,7 +72,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSUpdateTimestamp (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSWarnings.java b/src/test/JD/RS/JDRSWarnings.java index 8a19d72..6dca355 100644 --- a/src/test/JD/RS/JDRSWarnings.java +++ b/src/test/JD/RS/JDRSWarnings.java @@ -12,11 +12,6 @@ /////////////////////////////////////////////////////////////////////////////// package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestcase; - import java.io.FileOutputStream; import java.sql.ResultSet; import java.sql.SQLWarning; @@ -24,6 +19,11 @@ import java.util.Hashtable; import java.util.Vector; +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestcase; + /** @@ -119,6 +119,7 @@ protected void cleanup () @exception Exception If an exception occurs. **/ + @SuppressWarnings("deprecation") public void forceWarning (ResultSet rs) throws Exception { @@ -254,6 +255,7 @@ public void Var005() getWarning() - Returns the first warning when 2 warnings have been reported. **/ + @SuppressWarnings("deprecation") public void Var006() { if (checkJdbc20 ()) { diff --git a/src/test/JD/RS/JDRSWasNull.java b/src/test/JD/RS/JDRSWasNull.java index fdebe85..225271f 100644 --- a/src/test/JD/RS/JDRSWasNull.java +++ b/src/test/JD/RS/JDRSWasNull.java @@ -13,18 +13,18 @@ package test.JD.RS; -import com.ibm.as400.access.AS400; - -import test.JDRSTest; -import test.JDTestDriver; -import test.JDTestcase; - import java.io.FileOutputStream; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Hashtable; +import java.util.Vector; + +import com.ibm.as400.access.AS400; + +import test.JDRSTest; +import test.JDTestDriver; +import test.JDTestcase; @@ -63,7 +63,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSWasNull (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, diff --git a/src/test/JD/RS/JDRSWrapper.java b/src/test/JD/RS/JDRSWrapper.java index 1f340b2..c067f1d 100644 --- a/src/test/JD/RS/JDRSWrapper.java +++ b/src/test/JD/RS/JDRSWrapper.java @@ -20,18 +20,18 @@ package test.JD.RS; +import java.io.FileOutputStream; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.Hashtable; +import java.util.Vector; + import com.ibm.as400.access.AS400; import test.JDReflectionUtil; import test.JDTestDriver; import test.JDTestcase; -import java.io.FileOutputStream; -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.Statement; -import java.util.Hashtable; - /** Testcase JDRSWrapper. This tests the following methods @@ -66,7 +66,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRSWrapper (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -191,7 +191,7 @@ public void Var005() { if (checkJdbc40()) { try { - Object answer = JDReflectionUtil.callMethod_O(rs_, "unwrap", (Class) null); + Object answer = JDReflectionUtil.callMethod_O(rs_, "unwrap", (Class) null); assertCondition(false, "Exception should have been thrown unwrapping null "+answer ); } catch (Exception e) { assertExceptionIsInstanceOf (e, "java.sql.SQLException"); diff --git a/src/test/JD/RS/JDRowSetRSTestcase.java b/src/test/JD/RS/JDRowSetRSTestcase.java index 7909f60..2d04b36 100644 --- a/src/test/JD/RS/JDRowSetRSTestcase.java +++ b/src/test/JD/RS/JDRowSetRSTestcase.java @@ -34,8 +34,6 @@ import java.io.StringReader; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; -import java.net.InetAddress; -import java.net.UnknownHostException; // import java.security.interfaces.DSAKey; import java.sql.*; import javax.sql.*; @@ -89,7 +87,7 @@ public static void main(String args[]) throws Exception { Constructor. **/ public JDRowSetRSTestcase (AS400 systemObject, - Hashtable namesAndVars, + Hashtable> namesAndVars, int runMode, FileOutputStream fileOutputStream, @@ -382,6 +380,7 @@ public void position0(RowSet rs, String key) throws SQLException @exception Exception If an exception occurs. **/ + @SuppressWarnings("deprecation") public void forceWarning (RowSet rs) throws Exception { //@A1 @@ -389,7 +388,7 @@ public void forceWarning (RowSet rs) { position(rs, "NUMBER_POS"); //@C1A // This should force the warning "data truncation". - ((AS400JDBCRowSet)rs).getBigDecimal ("C_NUMERIC_105", 0); //@C1A + ((AS400JDBCRowSet)rs).getBigDecimal ("C_NUMERIC_105",0); //@C1A //((AS400JDBCRowSet)rs).updateString ("VALUE", "Lots more than 25 characters."); //@C1D } else @@ -933,7 +932,7 @@ public void Var007() rowset.beforeFirst (); int rowCountBefore = 0; - Vector keysBefore = new Vector (); + Vector keysBefore = new Vector (); while (rowset.next ()) { ++rowCountBefore; @@ -954,7 +953,7 @@ public void Var007() rowset2.execute(); int rowCountAfter = 0; - Vector keysAfter = new Vector (); + Vector keysAfter = new Vector (); while (rowset2.next ()) { ++rowCountAfter; keysAfter.addElement (rowset2.getString ("C_KEY")); @@ -1273,6 +1272,7 @@ public void Var016() /** getBigDecimal() with 2 parameters - Should work when the column index is valid. **/ + @SuppressWarnings("deprecation") public void Var017() { try { @@ -3052,7 +3052,7 @@ public void Var083() rowset.setCommand("SELECT * FROM QIWS.QCUSTCDT"); rowset.setMaxRows(25); - Map m = rowset.getTypeMap(); + Map> m = rowset.getTypeMap(); if (getDriver () == JDTestDriver.DRIVER_NATIVE) { assertCondition(m == null); diff --git a/src/test/JDCleanSplfJdbc.java b/src/test/JDCleanSplfJdbc.java index 5b99264..c829b6c 100644 --- a/src/test/JDCleanSplfJdbc.java +++ b/src/test/JDCleanSplfJdbc.java @@ -354,7 +354,7 @@ public static JDCleanSplfJdbcResults deleteSpoolFilesAttempt(PrintStream out, Co boolean addComma = false; if (deleteAll) { String query = " SELECT JOB_USER, SPOOLED_FILE_NAME, SPOOLED_FILE_NUMBER ,JOB_NUMBER || '/' || JOB_USER || '/' || JOB_NAME , CREATION_TIMESTAMP , TOTAL_PAGES, SIZE , USER_DATA " - + " FROM TABLE(QSYS2 . SPOOLED_FILE_INFO ( STARTING_TIMESTAMP => '" + + " FROM TABLE(QSYS2 . SPOOLED_FILE_INFO (USER_NAME=>'*ALL', STARTING_TIMESTAMP => '" + startTimestamp.toString() + "'" + " , ENDING_TIMESTAMP =>'" + endTimestamp.toString() + "'))"; System.out.println(query); @@ -401,7 +401,7 @@ public static JDCleanSplfJdbcResults deleteUselessSpoolFilesAttempt(PrintStream long startMillis = System.currentTimeMillis(); Statement stmt = c.createStatement(); String query = " SELECT JOB_USER, SPOOLED_FILE_NAME, SPOOLED_FILE_NUMBER ,JOB_NUMBER || '/' || JOB_USER || '/' || JOB_NAME , CREATION_TIMESTAMP , TOTAL_PAGES, SIZE , USER_DATA " - + " FROM TABLE(QSYS2 . SPOOLED_FILE_INFO ( STARTING_TIMESTAMP => '" + + " FROM TABLE(QSYS2 . SPOOLED_FILE_INFO (USER_NAME=>'*ALL', STARTING_TIMESTAMP => '" + startTimestamp.toString() + "'" + " , ENDING_TIMESTAMP =>'" + endTimestamp.toString() + "'))"; runCleaningQuery(out, stmt, query, clean); stmt.close();