diff --git a/airsonic-main/src/main/java/org/airsonic/player/service/search/SearchServiceUtilities.java b/airsonic-main/src/main/java/org/airsonic/player/service/search/SearchServiceUtilities.java index db6ef4d9..fa790fde 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/service/search/SearchServiceUtilities.java +++ b/airsonic-main/src/main/java/org/airsonic/player/service/search/SearchServiceUtilities.java @@ -138,7 +138,7 @@ public class SearchServiceUtilities { public final boolean addIgnoreNull(Collection collection, IndexType indexType, int subjectId) { - if (indexType == IndexType.ALBUM | indexType == IndexType.SONG) { + if (indexType == IndexType.ALBUM || indexType == IndexType.SONG) { return addIgnoreNull(collection, mediaFileService.getMediaFile(subjectId)); } else if (indexType == IndexType.ALBUM_ID3) { return addIgnoreNull(collection, albumDao.getAlbum(subjectId)); @@ -163,8 +163,8 @@ public class SearchServiceUtilities { public final void addIfAnyMatch(SearchResult dist, IndexType subjectIndexType, Document subject) { int documentId = getId.apply(subject); - if (subjectIndexType == IndexType.ARTIST | subjectIndexType == IndexType.ALBUM - | subjectIndexType == IndexType.SONG) { + if (subjectIndexType == IndexType.ARTIST || subjectIndexType == IndexType.ALBUM + || subjectIndexType == IndexType.SONG) { addMediaFileIfAnyMatch.accept(dist.getMediaFiles(), documentId); } else if (subjectIndexType == IndexType.ARTIST_ID3) { addArtistId3IfAnyMatch.accept(dist.getArtists(), documentId); diff --git a/airsonic-main/src/main/java/org/airsonic/player/spring/RegisterPrecompiledJSPInitializer.java b/airsonic-main/src/main/java/org/airsonic/player/spring/RegisterPrecompiledJSPInitializer.java index 81e5e4c2..ec93db79 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/spring/RegisterPrecompiledJSPInitializer.java +++ b/airsonic-main/src/main/java/org/airsonic/player/spring/RegisterPrecompiledJSPInitializer.java @@ -59,14 +59,13 @@ public class RegisterPrecompiledJSPInitializer implements ServletContextInitiali precompiledJspWebXml), IOUtils.toInputStream("", Charset.defaultCharset())); - JAXBContext jaxbContext; try { - jaxbContext = new JAXBDataBinding(WebApp.class).getContext(); + JAXBContext jaxbContext = new JAXBDataBinding(WebApp.class).getContext(); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); WebApp webapp = (WebApp) unmarshaller.unmarshal(webXmlIS); try { webXmlIS.close(); - } catch (java.io.IOException e) {} + } catch (java.io.IOException ignored) {} return webapp; } catch (JAXBException e) { throw new RuntimeException("Could not parse precompiled-jsp-web.xml", e);