From 9d919738452a6ed1a16168066152f2a0e3b59b19 Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Tue, 27 May 2025 15:34:16 +0200 Subject: [PATCH] Maven should not filter out non-jrt URLs from Java platform modular BCP. --- .../maven/classpath/PlatformModulesPathImpl.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/java/maven/src/org/netbeans/modules/maven/classpath/PlatformModulesPathImpl.java b/java/maven/src/org/netbeans/modules/maven/classpath/PlatformModulesPathImpl.java index 4f5c9e532c82..31b9618925f8 100644 --- a/java/maven/src/org/netbeans/modules/maven/classpath/PlatformModulesPathImpl.java +++ b/java/maven/src/org/netbeans/modules/maven/classpath/PlatformModulesPathImpl.java @@ -19,7 +19,6 @@ package org.netbeans.modules.maven.classpath; import java.util.ArrayList; -import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.logging.Level; @@ -36,7 +35,6 @@ * @author Tomas Stupka */ public class PlatformModulesPathImpl extends AbstractBootPathImpl { - private static final String PROTOCOL_NBJRT = "nbjrt"; //NOI18N private static final Logger LOGGER = Logger.getLogger(PlatformModulesPathImpl.class.getName()); public PlatformModulesPathImpl(NbMavenProjectImpl project) { @@ -47,11 +45,9 @@ public PlatformModulesPathImpl(NbMavenProjectImpl project) { protected List createResources() { final List res = new ArrayList<>(); JavaPlatform pf = findActivePlatform(); - Arrays.stream(new JavaPlatform[] {findActivePlatform()}) - .flatMap((plat)->plat.getBootstrapLibraries().entries().stream()) - .map((entry) -> entry.getURL()) - .filter((root) -> (PROTOCOL_NBJRT.equals(root.getProtocol()))) - .forEach((root)->{res.add(ClassPathSupport.createResource(root));}); + pf.getBootstrapLibraries() + .entries() + .forEach(entry -> res.add(ClassPathSupport.createResource(entry.getURL()))); if(LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "PlatformModulesPath for project {0} and platform {1}", new Object[] {project.getProjectDirectory().getPath(), pf.getDisplayName()}); }