# HG changeset patch # User Martin van Dinther <martin.van.dinther@monetdbsolutions.com> # Date 1506605785 -7200 # Node ID bac9345e7d9964c9737542a75f7696110ff70322 # Parent e5c67a23d7d665cf180d5ab1f4ab70375dc0c4c8 Resolve some compilation warnings for java test programs. Also compile without debug. 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}"