Changeset: 68994abe3e03 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/68994abe3e03 Modified Files: tests/TLSTester.java Branch: default Log Message:
Also catch java.net.URISyntaxException and java.net.MalformedURLException and convert them to an IOException. diffs (19 lines): diff --git a/tests/TLSTester.java b/tests/TLSTester.java --- a/tests/TLSTester.java +++ b/tests/TLSTester.java @@ -128,7 +128,14 @@ public class TLSTester { } private InputStream fetchData(String resource) throws IOException { - URL url = new java.net.URI("http://" + serverHost + ":" + serverPort + resource).toURL; + URL url; + try { + // Note: as of Java version 20 java.net.URL(String) constructor is deprecated. + // https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/net/URL.html#%3Cinit%3E(java.lang.String) + url = new java.net.URI("http://" + serverHost + ":" + serverPort + resource).toURL(); + } catch (java.net.URISyntaxException | java.net.MalformedURLException e) { + throw new IOException(e.getMessage()); + } URLConnection conn = url.openConnection(); conn.connect(); return conn.getInputStream(); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org