Changeset: bac9345e7d99 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=bac9345e7d99 Modified Files: tests/Test_Cmanycon.java tests/Test_PSmanycon.java tests/build.xml Branch: default Log Message:
Resolve some compilation warnings for java test programs. Also compile without debug. diffs (49 lines): diff --git a/tests/Test_Cmanycon.java b/tests/Test_Cmanycon.java --- a/tests/Test_Cmanycon.java +++ b/tests/Test_Cmanycon.java @@ -12,7 +12,7 @@ import java.util.*; public class Test_Cmanycon { public static void main(String[] args) throws Exception { // Class.forName("nl.cwi.monetdb.jdbc.MonetDriver"); // not needed anymore for self registering JDBC drivers - List cons = new ArrayList(100); // Connections go in here + List<Connection> cons = new ArrayList<Connection>(100); // Connections go in here try { // spawn a lot of Connections, just for fun... diff --git a/tests/Test_PSmanycon.java b/tests/Test_PSmanycon.java --- a/tests/Test_PSmanycon.java +++ b/tests/Test_PSmanycon.java @@ -12,10 +12,10 @@ import java.util.*; public class Test_PSmanycon { public static void main(String[] args) throws Exception { // Class.forName("nl.cwi.monetdb.jdbc.MonetDriver"); // not needed anymore for self registering JDBC drivers - List pss = new ArrayList(100); // Connections go in here + List<PreparedStatement> pss = new ArrayList<PreparedStatement>(100); // PreparedStatements go in here try { - // spawn a lot of Connections, just for fun... + // spawn a lot of Connections with 1 PreparedStatement, just for fun... int i; for (i = 0; i < 50; i++) { System.out.print("Establishing Connection " + i + "..."); @@ -43,6 +43,8 @@ public class Test_PSmanycon { if (!rs.next()) throw new Exception("ResultSet is empty"); System.out.print(" result: " + rs.getString(1)); + + // close the connection and associated resources pstmt.getConnection().close(); System.out.println(", done"); diff --git a/tests/build.xml b/tests/build.xml --- a/tests/build.xml +++ b/tests/build.xml @@ -45,7 +45,7 @@ Copyright 1997 - July 2008 CWI, August 2 <javac srcdir="${srcdir}" destdir="${builddir}" - debug="true" + debug="false" optimize="false" includeantruntime="false" source="${jvm.version}" _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list