Mercurial > hg > monetdb-java
comparison example/MJDBCTest.java @ 257:529b92d09fc6
Resolve compilation warnings when compiled with javac -Xlint
such as:
tests/SQLcopyinto.java:93: warning: [rawtypes] found raw type: List
List warning = server.connect(host, port, login, passw);
^
missing type arguments for generic class List<E>
where E is a type-variable:
E extends Object declared in interface List
tests/SQLcopyinto.java:95: warning: [rawtypes] found raw type: Iterator
for (Iterator it = warning.iterator(); it.hasNext(); ) {
^
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, 22 Nov 2018 13:12:53 +0100 (2018-11-22) |
parents | 5ea126405bac |
children | d4baf8a4b43a |
comparison
equal
deleted
inserted
replaced
256:37b537a7ad60 | 257:529b92d09fc6 |
---|---|
16 * @author Fabian Groffen | 16 * @author Fabian Groffen |
17 */ | 17 */ |
18 public class MJDBCTest { | 18 public class MJDBCTest { |
19 public static void main(String[] args) throws Exception { | 19 public static void main(String[] args) throws Exception { |
20 String MonetDB_JDBC_URL = "jdbc:monetdb://localhost:50000/demo"; // change host, port and databasename | 20 String MonetDB_JDBC_URL = "jdbc:monetdb://localhost:50000/demo"; // change host, port and databasename |
21 Connection con; | 21 Connection con = null; |
22 try { | 22 try { |
23 con = DriverManager.getConnection(MonetDB_JDBC_URL, "monetdb", "monetdb"); | 23 con = DriverManager.getConnection(MonetDB_JDBC_URL, "monetdb", "monetdb"); |
24 } catch (SQLException e) { | 24 } catch (SQLException e) { |
25 System.err.println("Failed to connect to MonetDB server! Message: " + e.getMessage()); | 25 System.err.println("Failed to connect to MonetDB server! Message: " + e.getMessage()); |
26 } | 26 } |