Mercurial > hg > monetdb-java
changeset 185:91f2bab75b9b
Resolving javac warnings:
Test_Cmanycon.java:34: warning: [rawtypes] found raw type: Iterator
for (Iterator it = cons.iterator(); it.hasNext(); i++) {
^
missing type arguments for generic class Iterator<E>
where E is a type-variable:
E extends Object declared in interface Iterator
Test_PSmanycon.java:34: warning: [rawtypes] found raw type: Iterator
for (Iterator it = pss.iterator(); it.hasNext(); i++) {
^
missing type arguments for generic class Iterator<E>
where E is a type-variable:
E extends Object declared in interface Iterator
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 12 Oct 2017 18:26:29 +0200 (2017-10-12) |
parents | e0f76fedafc8 |
children | 4767b005a531 |
files | tests/Test_Cmanycon.java tests/Test_PSmanycon.java |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/Test_Cmanycon.java +++ b/tests/Test_Cmanycon.java @@ -31,8 +31,8 @@ public class Test_Cmanycon { // now try to nicely close them i = 0; - for (Iterator it = cons.iterator(); it.hasNext(); i++) { - Connection con = (Connection)(it.next()); + for (Iterator<Connection> it = cons.iterator(); it.hasNext(); i++) { + Connection con = it.next(); // see if the connection still works System.out.print("Closing Connection " + i + "...");
--- a/tests/Test_PSmanycon.java +++ b/tests/Test_PSmanycon.java @@ -31,8 +31,8 @@ public class Test_PSmanycon { // now try to nicely execute them i = 0; - for (Iterator it = pss.iterator(); it.hasNext(); i++) { - PreparedStatement pstmt = (PreparedStatement)(it.next()); + for (Iterator<PreparedStatement> it = pss.iterator(); it.hasNext(); i++) { + PreparedStatement pstmt = it.next(); // see if the connection still works System.out.print("Executing PreparedStatement " + i + "...");