diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/internal/gradle/checksums/WrapperValidator.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/internal/gradle/checksums/WrapperValidator.java index f70020340f..d8673908bb 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/internal/gradle/checksums/WrapperValidator.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/internal/gradle/checksums/WrapperValidator.java @@ -31,6 +31,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; @@ -47,10 +48,6 @@ import org.osgi.framework.Bundle; import com.google.common.base.Charsets; -import com.google.common.base.Function; -import com.google.common.base.Predicate; -import com.google.common.collect.FluentIterable; -import com.google.common.collect.ImmutableList; import com.google.common.io.CharStreams; import com.google.common.io.Closeables; import com.google.gson.Gson; @@ -110,21 +107,10 @@ public ValidationResult checkWrapper(String baseDir) throws CoreException { }; List> versions = gson.fromJson(json, typeToken.getType()); //@formatter:off - ImmutableList urls = FluentIterable - .from(versions) - .filter(new Predicate>() { - @Override - public boolean apply(Map input) { - return input.get(WRAPPER_CHECKSUM_URL) != null; - } - }) - .transform(new Function, String>() { - @Override - public String apply(Map input) { - return input.get(WRAPPER_CHECKSUM_URL); - } - }) - .toList(); + List urls = versions.stream() + .map(input -> input.get(WRAPPER_CHECKSUM_URL)) + .filter(Objects::nonNull) + .toList(); // @formatter:on DownloadChecksumJob downloadJob = new DownloadChecksumJob(); int count = 0;