More lambdaification
This commit is contained in:
@@ -278,7 +278,7 @@ public class PlayQueue {
|
||||
}
|
||||
};
|
||||
|
||||
Collections.sort(files, comparator);
|
||||
files.sort(comparator);
|
||||
if (currentFile != null) {
|
||||
index = files.indexOf(currentFile);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
package org.airsonic.player.service;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -364,12 +363,7 @@ public class LastFmService {
|
||||
|
||||
Collection<Album> matches = Album.search(query.toString(), LAST_FM_KEY);
|
||||
return FluentIterable.from(matches)
|
||||
.transform(new Function<Album, LastFmCoverArt>() {
|
||||
@Override
|
||||
public LastFmCoverArt apply(Album album) {
|
||||
return convert(album);
|
||||
}
|
||||
})
|
||||
.transform(album1 -> convert(album1))
|
||||
.filter(Predicates.notNull())
|
||||
.toList();
|
||||
} catch (Throwable x) {
|
||||
|
||||
@@ -451,7 +451,7 @@ public class PodcastService {
|
||||
}
|
||||
|
||||
// Sort episode in reverse chronological order (newest first)
|
||||
Collections.sort(episodes, (a, b) -> {
|
||||
episodes.sort((a, b) -> {
|
||||
long timeA = a.getPublishDate() == null ? 0L : a.getPublishDate().getTime();
|
||||
long timeB = b.getPublishDate() == null ? 0L : b.getPublishDate().getTime();
|
||||
|
||||
|
||||
@@ -76,12 +76,7 @@ public class UPnPService {
|
||||
setMediaServerEnabled(true);
|
||||
}
|
||||
}
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
ensureServiceStopped();
|
||||
}
|
||||
});
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> ensureServiceStopped()));
|
||||
}
|
||||
|
||||
public void ensureServiceStarted() {
|
||||
|
||||
Reference in New Issue
Block a user