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

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

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

@ -22,7 +22,7 @@ package org.airsonic.player.controller;
import org.airsonic.player.domain.User;
import org.airsonic.player.service.SecurityService;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.ChartUtils;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.AxisLocation;
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());
ChartUtilities.writeChartAsPNG(response.getOutputStream(), chart, IMAGE_WIDTH, imageHeight);
ChartUtils.writeChartAsPNG(response.getOutputStream(), chart, IMAGE_WIDTH, imageHeight);
return null;
}

@ -13,7 +13,6 @@ import org.springframework.stereotype.Service;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Date;
@ -41,11 +40,7 @@ public class JWTSecurityService {
}
public static Algorithm getAlgorithm(String jwtKey) {
try {
return Algorithm.HMAC256(jwtKey);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return Algorithm.HMAC256(jwtKey);
}
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.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Namespace;
import org.jdom.input.SAXBuilder;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.Namespace;
import org.jdom2.input.SAXBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -94,6 +94,7 @@ public class PodcastService {
public PodcastService() {
ThreadFactory threadFactory = new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread t = Executors.defaultThreadFactory().newThread(r);
t.setDaemon(true);
@ -125,6 +126,7 @@ public class PodcastService {
public synchronized void schedule() {
Runnable task = new Runnable() {
@Override
public void run() {
LOG.info("Starting scheduled Podcast refresh.");
refreshAllChannels(true);
@ -232,7 +234,7 @@ public class PodcastService {
}
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) {
if (episode.getPath() == null || securityService.isReadAllowed(new File(episode.getPath()))) {
result.add(episode);
@ -291,6 +293,7 @@ public class PodcastService {
private void refreshChannels(final List<PodcastChannel> channels, final boolean downloadEpisodes) {
for (final PodcastChannel channel : channels) {
Runnable task = new Runnable() {
@Override
public void run() {
doRefreshChannel(channel, downloadEpisodes);
}
@ -299,7 +302,6 @@ public class PodcastService {
}
}
@SuppressWarnings({"unchecked"})
private void doRefreshChannel(PodcastChannel channel, boolean downloadEpisodes) {
InputStream in = null;
@ -408,6 +410,7 @@ public class PodcastService {
public void downloadEpisode(final PodcastEpisode episode) {
Runnable task = new Runnable() {
@Override
public void run() {
doDownloadEpisode(episode);
}
@ -417,7 +420,7 @@ public class PodcastService {
private void refreshEpisodes(PodcastChannel channel, List<Element> episodeElements) {
List<PodcastEpisode> episodes = new ArrayList<PodcastEpisode>();
List<PodcastEpisode> episodes = new ArrayList<>();
for (Element episodeElement : episodeElements) {
@ -461,6 +464,7 @@ public class PodcastService {
// Sort episode in reverse chronological order (newest first)
Collections.sort(episodes, new Comparator<PodcastEpisode>() {
@Override
public int compare(PodcastEpisode a, PodcastEpisode b) {
long timeA = a.getPublishDate() == null ? 0L : a.getPublishDate().getTime();
long timeB = b.getPublishDate() == null ? 0L : b.getPublishDate().getTime();

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

Loading…
Cancel
Save