Fix two issues found by LGTM

This commit is contained in:
jvoisin
2019-09-01 18:11:48 +02:00
parent c0fa01206a
commit 46d806df1d
2 changed files with 4 additions and 1 deletions
@@ -745,7 +745,7 @@ public class PlayQueueService {
List<PlayQueueInfo.Entry> entries = new ArrayList<>();
for (InternetRadioSource streamSource: internetRadioService.getInternetRadioSources(radio)) {
// Fake entry id so that the source can be selected in the UI
Integer streamId = -(1 + entries.size());
int streamId = -(1 + entries.size());
Integer streamTrackNumber = entries.size();
String streamUrl = streamSource.getStreamUrl();
entries.add(new PlayQueueInfo.Entry(
@@ -64,6 +64,9 @@ public class RegisterPrecompiledJSPInitializer implements ServletContextInitiali
jaxbContext = new JAXBDataBinding(WebApp.class).getContext();
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
WebApp webapp = (WebApp) unmarshaller.unmarshal(webXmlIS);
try {
webXmlIS.close();
} catch (java.io.IOException e) {}
return webapp;
} catch (JAXBException e) {
throw new RuntimeException("Could not parse precompiled-jsp-web.xml", e);