Mercurial > hg > monetdb-java
changeset 174:bac9345e7d99
Resolve some compilation warnings for java test programs.
Also compile without debug.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 28 Sep 2017 15:36:25 +0200 (2017-09-28) |
parents | e5c67a23d7d6 |
children | 8700d9ef2ace |
files | tests/Test_Cmanycon.java tests/Test_PSmanycon.java tests/build.xml |
diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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...
--- 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");