Skip to content

Commit

Permalink
Fix Gradle tests started with Java 23
Browse files Browse the repository at this point in the history
  • Loading branch information
snjeza committed Aug 12, 2024
1 parent ebd30cd commit 7749074
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.Map.Entry;
import java.util.stream.Stream;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -218,7 +218,7 @@ private static File getGradleInitScriptTempFile(String scriptPath) {
* <ul>
* @param initScript the init script file.
* @param checksum the expected checksum of the file.
*
*
* @throws IOException
* @throws NoSuchAlgorithmException
*/
Expand Down Expand Up @@ -260,7 +260,7 @@ public static Map<String, String> parseProcessorOptions(List<Object> compilerArg
return Collections.emptyMap();
}
Map<String, String> options = new HashMap<>();

for(Object arg : compilerArgs) {
String argString = String.valueOf(arg);
if (argString.startsWith("-A")) {
Expand Down Expand Up @@ -340,9 +340,10 @@ public static File getJdkToLaunchDaemon(String highestJavaVersion) {
*/
private static Map<String, File> getAllVmInstalls() {
List<IVMInstall> vmList = Stream.of(JavaRuntime.getVMInstallTypes())
.map(IVMInstallType::getVMInstalls)
.flatMap(Arrays::stream)
.toList();
// https://github.com/eclipse-jdtls/eclipse-jdt-core-incubator/issues/609
.filter(t -> (t.getName() != null && !t.getName().startsWith("TestVMInstall-")))
.map(IVMInstallType::getVMInstalls)
.flatMap(Arrays::stream).toList();
Map<String, File> vmInstalls = new HashMap<>();
for (IVMInstall vmInstall : vmList) {
if (vmInstall instanceof AbstractVMInstall vm) {
Expand Down

0 comments on commit 7749074

Please sign in to comment.