Replace anonymous class by lambda
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 4 May 2015 18:19:25 +0000 (20:19 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 4 May 2015 18:19:25 +0000 (20:19 +0200)
src/main/java/net/pterodactylus/rhynodge/filters/comics/SaturdayMorningBreakfastCerealComicFilter.java

index bfdbda4..e37f01a 100644 (file)
@@ -45,13 +45,7 @@ public class SaturdayMorningBreakfastCerealComicFilter extends ComicSiteFilter {
        protected List<String> extractImageUrls(Document document) {
                String imageUrl = document.select("#comicimage img").get(0).attr("src");
                String afterImageUrl = document.select("#aftercomic img").attr("src");
-               return FluentIterable.from(Arrays.asList(imageUrl, afterImageUrl)).filter(new Predicate<String>() {
-
-                       @Override
-                       public boolean apply(String url) {
-                               return url.length() > 0;
-                       }
-               }).toList();
+               return FluentIterable.from(Arrays.asList(imageUrl, afterImageUrl)).filter(url -> url.length() > 0).toList();
        }
 
        @Override