Skip to content

Commit

Permalink
Use URI instead of URL
Browse files Browse the repository at this point in the history
  • Loading branch information
prasser committed Aug 30, 2024
1 parent d127879 commit 89d5e19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gui/org/deidentifier/arx/gui/Update.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

Expand Down Expand Up @@ -110,12 +111,12 @@ private String getOnlineVersion() {
StringBuilder builder = new StringBuilder();
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(new URL(UPDATE_URL).openStream(), CHARSET ));
in = new BufferedReader(new InputStreamReader(new URI(UPDATE_URL).toURL().openStream(), CHARSET ));
String line;
while ((line = in.readLine()) != null) {
builder.append(line).append("\n"); //$NON-NLS-1$
}
} catch (IOException e) {
} catch (IOException | URISyntaxException e) {
// Ignore
} finally {
if (in != null) {
Expand Down

0 comments on commit 89d5e19

Please sign in to comment.