diff options
author | syeyoung <cyong06@naver.com> | 2021-05-08 17:23:08 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-05-08 17:23:08 +0900 |
commit | b34b217f44c0c5ae7e69a4d7b830a8607f5fc13a (patch) | |
tree | 6467fd8dbec016cc63b27dad05c4060e59f70d2b /src/main/java/kr/syeyoung/dungeonsguide/url/DGConnection.java | |
parent | 5f5e168df2abd0f168ae780d1ffeb4b7dab6c0a8 (diff) | |
download | Skyblock-Dungeons-Guide-b34b217f44c0c5ae7e69a4d7b830a8607f5fc13a.tar.gz Skyblock-Dungeons-Guide-b34b217f44c0c5ae7e69a4d7b830a8607f5fc13a.tar.bz2 Skyblock-Dungeons-Guide-b34b217f44c0c5ae7e69a4d7b830a8607f5fc13a.zip |
cosmetics.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/url/DGConnection.java')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/url/DGConnection.java | 12 |
1 files changed, 5 insertions, 7 deletions
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(); } } |