Fix two issues found by LGTM
This commit is contained in:
@@ -745,7 +745,7 @@ public class PlayQueueService {
|
|||||||
List<PlayQueueInfo.Entry> entries = new ArrayList<>();
|
List<PlayQueueInfo.Entry> entries = new ArrayList<>();
|
||||||
for (InternetRadioSource streamSource: internetRadioService.getInternetRadioSources(radio)) {
|
for (InternetRadioSource streamSource: internetRadioService.getInternetRadioSources(radio)) {
|
||||||
// Fake entry id so that the source can be selected in the UI
|
// 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();
|
Integer streamTrackNumber = entries.size();
|
||||||
String streamUrl = streamSource.getStreamUrl();
|
String streamUrl = streamSource.getStreamUrl();
|
||||||
entries.add(new PlayQueueInfo.Entry(
|
entries.add(new PlayQueueInfo.Entry(
|
||||||
|
|||||||
+3
@@ -64,6 +64,9 @@ public class RegisterPrecompiledJSPInitializer implements ServletContextInitiali
|
|||||||
jaxbContext = new JAXBDataBinding(WebApp.class).getContext();
|
jaxbContext = new JAXBDataBinding(WebApp.class).getContext();
|
||||||
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
|
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
|
||||||
WebApp webapp = (WebApp) unmarshaller.unmarshal(webXmlIS);
|
WebApp webapp = (WebApp) unmarshaller.unmarshal(webXmlIS);
|
||||||
|
try {
|
||||||
|
webXmlIS.close();
|
||||||
|
} catch (java.io.IOException e) {}
|
||||||
return webapp;
|
return webapp;
|
||||||
} catch (JAXBException e) {
|
} catch (JAXBException e) {
|
||||||
throw new RuntimeException("Could not parse precompiled-jsp-web.xml", e);
|
throw new RuntimeException("Could not parse precompiled-jsp-web.xml", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user