From b34b217f44c0c5ae7e69a4d7b830a8607f5fc13a Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 8 May 2021 17:23:08 +0900 Subject: cosmetics. --- .../java/kr/syeyoung/dungeonsguide/url/DGConnection.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/url/DGConnection.java') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/url/DGConnection.java b/src/main/java/kr/syeyoung/dungeonsguide/url/DGConnection.java index 2fb35638..725abab9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/url/DGConnection.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/url/DGConnection.java @@ -37,13 +37,11 @@ public class DGConnection extends URLConnection { } @Override public InputStream getInputStream() throws IOException { - if (authenticator != null) { - String path = url.getPath().substring(1); - if (!authenticator.getResources().containsKey(path)) throw new FileNotFoundException(); - return new ByteArrayInputStream(authenticator.getResources().get(path)); - } else if (url.getPath().contains("roomdata")){ - return DGConnection.class.getResourceAsStream(url.getPath()); - } + if (authenticator != null) { + String path = url.getPath().substring(1); + if (!authenticator.getResources().containsKey(path)) throw new FileNotFoundException(); + return new ByteArrayInputStream(authenticator.getResources().get(path)); + } throw new FileNotFoundException(); } } -- cgit