Merge branch 'patch-25' into 'dev'

Update close for try witch resources

See merge request morningstar/Arcturus-Community!197
This commit is contained in:
Mike 2020-06-01 09:32:31 -04:00
commit fa1b27f4b7

View File

@ -133,10 +133,9 @@ public class YoutubeManager {
InputStream is = conn.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
YoutubePlaylist playlist = null;
YoutubePlaylist playlist;
try (BufferedReader br = new BufferedReader(isr)) {
playlist = null;
String inputLine;
while ((inputLine = br.readLine()) != null) {
if (inputLine.contains("window[\"ytInitialData\"]")) {
@ -161,8 +160,7 @@ public class YoutubeManager {
break;
}
}
br.close();
}
this.playlistCache.put(playlistId, playlist);