[cleanup] Use Comparator.comparing

Done with the JDT UI cleanup action.

Change-Id: Ifd0d7be20a648ffa902cd87c56f7fc31bc3b82f4
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/183556
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
index 9c0b1cb..714ce10 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
@@ -239,7 +239,7 @@
 		Bundle[] results = matchingBundleCapabilities.stream().map(c -> c.getRevision().getBundle())
 				// Remove all the bundles that are installed or uninstalled
 				.filter(bundle -> (bundle.getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0)
-				.sorted((b1, b2) -> b2.getVersion().compareTo(b1.getVersion())) // highest version first
+				.sorted(Comparator.comparing(Bundle::getVersion).reversed()) // highest version first
 				.toArray(Bundle[]::new);
 
 		return results.length > 0 ? results : null;