Update dependencies in airsonic-main

master
randomnicode 6 years ago
parent 77ca475fbe
commit 86e58cea3a
  1. 50
      airsonic-main/pom.xml
  2. 8
      airsonic-main/src/main/java/org/airsonic/player/ajax/LyricsService.java
  3. 6
      airsonic-main/src/main/java/org/airsonic/player/controller/JAXBWriter.java
  4. 6
      airsonic-main/src/main/java/org/airsonic/player/controller/StatusChartController.java
  5. 4
      airsonic-main/src/main/java/org/airsonic/player/controller/UserChartController.java
  6. 7
      airsonic-main/src/main/java/org/airsonic/player/service/JWTSecurityService.java
  7. 18
      airsonic-main/src/main/java/org/airsonic/player/service/PodcastService.java
  8. 8
      airsonic-main/src/main/java/org/airsonic/player/service/upnp/ApacheUpnpServiceConfiguration.java

@ -13,7 +13,6 @@
</parent> </parent>
<properties> <properties>
<metrics.version>3.1.0</metrics.version>
<chameleon.version>1.2.1-RELEASE</chameleon.version> <chameleon.version>1.2.1-RELEASE</chameleon.version>
<tomcat.server.scope>provided</tomcat.server.scope> <tomcat.server.scope>provided</tomcat.server.scope>
</properties> </properties>
@ -58,7 +57,6 @@
<dependency> <dependency>
<groupId>io.dropwizard.metrics</groupId> <groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId> <artifactId>metrics-core</artifactId>
<version>${metrics.version}</version>
</dependency> </dependency>
<!-- END Metrics --> <!-- END Metrics -->
@ -76,7 +74,7 @@
<dependency> <dependency>
<groupId>javax.servlet.jsp</groupId> <groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId> <artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version> <version>2.3.3</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -104,7 +102,7 @@
<dependency> <dependency>
<groupId>com.auth0</groupId> <groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId> <artifactId>java-jwt</artifactId>
<version>3.3.0</version> <version>3.4.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.ldap</groupId> <groupId>org.springframework.ldap</groupId>
@ -139,7 +137,7 @@
<dependency> <dependency>
<groupId>cglib</groupId> <groupId>cglib</groupId>
<artifactId>cglib</artifactId> <artifactId>cglib</artifactId>
<version>2.1_3</version> <version>3.2.9</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
@ -152,13 +150,11 @@
<dependency> <dependency>
<groupId>commons-codec</groupId> <groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId> <artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency> </dependency>
<dependency> <dependency>
@ -170,7 +166,6 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency> </dependency>
<dependency> <dependency>
@ -201,18 +196,17 @@
<version>1.0-b2</version> <version>1.0-b2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.directwebremoting</groupId> <groupId>org.directwebremoting</groupId>
<artifactId>dwr</artifactId> <artifactId>dwr</artifactId>
<version>3.0.rc1</version> <version>3.0.2-RELEASE</version>
</dependency> </dependency>
<!--Needed by dwr--> <!--Needed by dwr-->
<dependency> <dependency>
<groupId>com.yahoo.platform.yui</groupId> <groupId>com.yahoo.platform.yui</groupId>
<artifactId>yuicompressor</artifactId> <artifactId>yuicompressor</artifactId>
<version>2.3.6</version> <version>2.4.8</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
@ -229,9 +223,9 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>jfree</groupId> <groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId> <artifactId>jfreechart</artifactId>
<version>1.0.11</version> <version>1.5.0</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>junit</groupId> <groupId>junit</groupId>
@ -245,9 +239,9 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>jdom</groupId> <groupId>org.jdom</groupId>
<artifactId>jdom</artifactId> <artifactId>jdom</artifactId>
<version>1.0</version> <version>2.0.2</version>
</dependency> </dependency>
<dependency> <dependency>
@ -259,33 +253,30 @@
<dependency> <dependency>
<groupId>org.eclipse.persistence</groupId> <groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId> <artifactId>org.eclipse.persistence.moxy</artifactId>
<version>2.5.1</version> <version>2.7.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId> <artifactId>jstl</artifactId>
<version>1.2</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>stax</groupId> <groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId> <artifactId>stax-api</artifactId>
<version>1.0.1</version> <version>1.0-2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.mail</groupId> <groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId> <artifactId>javax.mail-api</artifactId>
<version>1.5.5</version>
</dependency> </dependency>
<dependency> <dependency>
@ -297,7 +288,6 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
@ -310,7 +300,6 @@
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -322,19 +311,19 @@
<dependency> <dependency>
<groupId>org.fourthline.cling</groupId> <groupId>org.fourthline.cling</groupId>
<artifactId>cling-core</artifactId> <artifactId>cling-core</artifactId>
<version>2.0.1</version> <version>2.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.fourthline.cling</groupId> <groupId>org.fourthline.cling</groupId>
<artifactId>cling-support</artifactId> <artifactId>cling-support</artifactId>
<version>2.0.1</version> <version>2.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.seamless</groupId> <groupId>org.seamless</groupId>
<artifactId>seamless-util</artifactId> <artifactId>seamless-util</artifactId>
<version>1.1.0</version> <version>1.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
@ -390,7 +379,7 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId> <artifactId>commons-configuration2</artifactId>
<version>2.1.1</version> <version>2.4</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>commons-logging</groupId> <groupId>commons-logging</groupId>
@ -402,13 +391,12 @@
<dependency> <dependency>
<groupId>com.mattbertolini</groupId> <groupId>com.mattbertolini</groupId>
<artifactId>liquibase-slf4j</artifactId> <artifactId>liquibase-slf4j</artifactId>
<version>1.2.1</version> <version>2.0.0</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-beanutils</groupId> <groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId> <artifactId>commons-beanutils</artifactId>
<version>1.9.3</version>
<!-- commons-configuration2 requires during runtime --> <!-- commons-configuration2 requires during runtime -->
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
@ -421,7 +409,7 @@
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId> <artifactId>maven-artifact</artifactId>
<version>3.3.9</version> <version>3.6.0</version>
</dependency> </dependency>
<dependency> <dependency>
@ -447,7 +435,6 @@
<dependency> <dependency>
<groupId>javax.validation</groupId> <groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId> <artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency> </dependency>
<dependency> <dependency>
@ -493,7 +480,6 @@
<dependency> <dependency>
<groupId>com.sun.mail</groupId> <groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId> <artifactId>javax.mail</artifactId>
<version>1.5.5</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>

@ -27,10 +27,10 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.jdom.Document; import org.jdom2.Document;
import org.jdom.Element; import org.jdom2.Element;
import org.jdom.Namespace; import org.jdom2.Namespace;
import org.jdom.input.SAXBuilder; import org.jdom2.input.SAXBuilder;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

@ -23,9 +23,9 @@ import org.airsonic.player.util.StringUtil;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.eclipse.persistence.jaxb.JAXBContext; import org.eclipse.persistence.jaxb.JAXBContext;
import org.eclipse.persistence.jaxb.MarshallerProperties; import org.eclipse.persistence.jaxb.MarshallerProperties;
import org.jdom.Attribute; import org.jdom2.Attribute;
import org.jdom.Document; import org.jdom2.Document;
import org.jdom.input.SAXBuilder; import org.jdom2.input.SAXBuilder;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.subsonic.restapi.Error; import org.subsonic.restapi.Error;

@ -22,7 +22,7 @@ package org.airsonic.player.controller;
import org.airsonic.player.domain.TransferStatus; import org.airsonic.player.domain.TransferStatus;
import org.airsonic.player.service.StatusService; import org.airsonic.player.service.StatusService;
import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities; import org.jfree.chart.ChartUtils;
import org.jfree.chart.JFreeChart; import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.AxisLocation; import org.jfree.chart.axis.AxisLocation;
import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.axis.ValueAxis;
@ -79,7 +79,7 @@ public class StatusChartController extends AbstractChartController {
} }
TransferStatus status = statuses.get(index); TransferStatus status = statuses.get(index);
TimeSeries series = new TimeSeries("Kbps", Millisecond.class); TimeSeries series = new TimeSeries("Kbps");
TransferStatus.SampleHistory history = status.getHistory(); TransferStatus.SampleHistory history = status.getHistory();
long to = System.currentTimeMillis(); long to = System.currentTimeMillis();
long from = to - status.getHistoryLengthMillis(); long from = to - status.getHistoryLengthMillis();
@ -154,7 +154,7 @@ public class StatusChartController extends AbstractChartController {
rangeAxis.setTickMarkPaint(fgColor); rangeAxis.setTickMarkPaint(fgColor);
rangeAxis.setAxisLinePaint(fgColor); rangeAxis.setAxisLinePaint(fgColor);
ChartUtilities.writeChartAsPNG(response.getOutputStream(), chart, IMAGE_WIDTH, IMAGE_HEIGHT); ChartUtils.writeChartAsPNG(response.getOutputStream(), chart, IMAGE_WIDTH, IMAGE_HEIGHT);
return null; return null;
} }

@ -22,7 +22,7 @@ package org.airsonic.player.controller;
import org.airsonic.player.domain.User; import org.airsonic.player.domain.User;
import org.airsonic.player.service.SecurityService; import org.airsonic.player.service.SecurityService;
import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities; import org.jfree.chart.ChartUtils;
import org.jfree.chart.JFreeChart; import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.AxisLocation; import org.jfree.chart.axis.AxisLocation;
import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.CategoryAxis;
@ -69,7 +69,7 @@ public class UserChartController extends AbstractChartController {
int imageHeight = Math.max(IMAGE_MIN_HEIGHT, 15 * dataset.getColumnCount()); int imageHeight = Math.max(IMAGE_MIN_HEIGHT, 15 * dataset.getColumnCount());
ChartUtilities.writeChartAsPNG(response.getOutputStream(), chart, IMAGE_WIDTH, imageHeight); ChartUtils.writeChartAsPNG(response.getOutputStream(), chart, IMAGE_WIDTH, imageHeight);
return null; return null;
} }

@ -13,7 +13,6 @@ import org.springframework.stereotype.Service;
import org.springframework.web.util.UriComponents; import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger; import java.math.BigInteger;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.util.Date; import java.util.Date;
@ -41,11 +40,7 @@ public class JWTSecurityService {
} }
public static Algorithm getAlgorithm(String jwtKey) { public static Algorithm getAlgorithm(String jwtKey) {
try { return Algorithm.HMAC256(jwtKey);
return Algorithm.HMAC256(jwtKey);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
} }
private static String createToken(String jwtKey, String path, Date expireDate) { private static String createToken(String jwtKey, String path, Date expireDate) {

@ -42,10 +42,10 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.entity.ContentType; import org.apache.http.entity.ContentType;
import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.jdom.Document; import org.jdom2.Document;
import org.jdom.Element; import org.jdom2.Element;
import org.jdom.Namespace; import org.jdom2.Namespace;
import org.jdom.input.SAXBuilder; import org.jdom2.input.SAXBuilder;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -94,6 +94,7 @@ public class PodcastService {
public PodcastService() { public PodcastService() {
ThreadFactory threadFactory = new ThreadFactory() { ThreadFactory threadFactory = new ThreadFactory() {
@Override
public Thread newThread(Runnable r) { public Thread newThread(Runnable r) {
Thread t = Executors.defaultThreadFactory().newThread(r); Thread t = Executors.defaultThreadFactory().newThread(r);
t.setDaemon(true); t.setDaemon(true);
@ -125,6 +126,7 @@ public class PodcastService {
public synchronized void schedule() { public synchronized void schedule() {
Runnable task = new Runnable() { Runnable task = new Runnable() {
@Override
public void run() { public void run() {
LOG.info("Starting scheduled Podcast refresh."); LOG.info("Starting scheduled Podcast refresh.");
refreshAllChannels(true); refreshAllChannels(true);
@ -232,7 +234,7 @@ public class PodcastService {
} }
private List<PodcastEpisode> filterAllowed(List<PodcastEpisode> episodes) { private List<PodcastEpisode> filterAllowed(List<PodcastEpisode> episodes) {
List<PodcastEpisode> result = new ArrayList<PodcastEpisode>(episodes.size()); List<PodcastEpisode> result = new ArrayList<>(episodes.size());
for (PodcastEpisode episode : episodes) { for (PodcastEpisode episode : episodes) {
if (episode.getPath() == null || securityService.isReadAllowed(new File(episode.getPath()))) { if (episode.getPath() == null || securityService.isReadAllowed(new File(episode.getPath()))) {
result.add(episode); result.add(episode);
@ -291,6 +293,7 @@ public class PodcastService {
private void refreshChannels(final List<PodcastChannel> channels, final boolean downloadEpisodes) { private void refreshChannels(final List<PodcastChannel> channels, final boolean downloadEpisodes) {
for (final PodcastChannel channel : channels) { for (final PodcastChannel channel : channels) {
Runnable task = new Runnable() { Runnable task = new Runnable() {
@Override
public void run() { public void run() {
doRefreshChannel(channel, downloadEpisodes); doRefreshChannel(channel, downloadEpisodes);
} }
@ -299,7 +302,6 @@ public class PodcastService {
} }
} }
@SuppressWarnings({"unchecked"})
private void doRefreshChannel(PodcastChannel channel, boolean downloadEpisodes) { private void doRefreshChannel(PodcastChannel channel, boolean downloadEpisodes) {
InputStream in = null; InputStream in = null;
@ -408,6 +410,7 @@ public class PodcastService {
public void downloadEpisode(final PodcastEpisode episode) { public void downloadEpisode(final PodcastEpisode episode) {
Runnable task = new Runnable() { Runnable task = new Runnable() {
@Override
public void run() { public void run() {
doDownloadEpisode(episode); doDownloadEpisode(episode);
} }
@ -417,7 +420,7 @@ public class PodcastService {
private void refreshEpisodes(PodcastChannel channel, List<Element> episodeElements) { private void refreshEpisodes(PodcastChannel channel, List<Element> episodeElements) {
List<PodcastEpisode> episodes = new ArrayList<PodcastEpisode>(); List<PodcastEpisode> episodes = new ArrayList<>();
for (Element episodeElement : episodeElements) { for (Element episodeElement : episodeElements) {
@ -461,6 +464,7 @@ public class PodcastService {
// Sort episode in reverse chronological order (newest first) // Sort episode in reverse chronological order (newest first)
Collections.sort(episodes, new Comparator<PodcastEpisode>() { Collections.sort(episodes, new Comparator<PodcastEpisode>() {
@Override
public int compare(PodcastEpisode a, PodcastEpisode b) { public int compare(PodcastEpisode a, PodcastEpisode b) {
long timeA = a.getPublishDate() == null ? 0L : a.getPublishDate().getTime(); long timeA = a.getPublishDate() == null ? 0L : a.getPublishDate().getTime();
long timeB = b.getPublishDate() == null ? 0L : b.getPublishDate().getTime(); long timeB = b.getPublishDate() == null ? 0L : b.getPublishDate().getTime();

@ -20,10 +20,10 @@
package org.airsonic.player.service.upnp; package org.airsonic.player.service.upnp;
import org.fourthline.cling.DefaultUpnpServiceConfiguration; import org.fourthline.cling.DefaultUpnpServiceConfiguration;
import org.fourthline.cling.transport.impl.apache.StreamClientConfigurationImpl; import org.fourthline.cling.transport.impl.StreamClientConfigurationImpl;
import org.fourthline.cling.transport.impl.apache.StreamClientImpl; import org.fourthline.cling.transport.impl.StreamClientImpl;
import org.fourthline.cling.transport.impl.apache.StreamServerConfigurationImpl; import org.fourthline.cling.transport.impl.StreamServerConfigurationImpl;
import org.fourthline.cling.transport.impl.apache.StreamServerImpl; import org.fourthline.cling.transport.impl.StreamServerImpl;
import org.fourthline.cling.transport.spi.NetworkAddressFactory; import org.fourthline.cling.transport.spi.NetworkAddressFactory;
import org.fourthline.cling.transport.spi.StreamClient; import org.fourthline.cling.transport.spi.StreamClient;
import org.fourthline.cling.transport.spi.StreamServer; import org.fourthline.cling.transport.spi.StreamServer;

Loading…
Cancel
Save