Mercurial > hg > monetdb-java
comparison tests/TLSTester.java @ 858:d74e850e2991
Resolve warning: [deprecation] URL(String) in URL has been deprecated
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 01 Feb 2024 14:11:10 +0100 (15 months ago) |
parents | 839d76eeb4ae |
children | 68994abe3e03 |
comparison
equal
deleted
inserted
replaced
857:8dc5047e9d04 | 858:d74e850e2991 |
---|---|
126 return out.toByteArray(); | 126 return out.toByteArray(); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 private InputStream fetchData(String resource) throws IOException { | 130 private InputStream fetchData(String resource) throws IOException { |
131 URL url = new URL("http://" + serverHost + ":" + serverPort + resource); | 131 URL url = new java.net.URI("http://" + serverHost + ":" + serverPort + resource).toURL; |
132 URLConnection conn = url.openConnection(); | 132 URLConnection conn = url.openConnection(); |
133 conn.connect(); | 133 conn.connect(); |
134 return conn.getInputStream(); | 134 return conn.getInputStream(); |
135 } | 135 } |
136 | 136 |