Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -47,11 +45,9 @@ public PlatformModulesPathImpl(NbMavenProjectImpl project) {
protected List<PathResourceImplementation> createResources() {
final List<PathResourceImplementation> 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()});
}
Expand Down
Loading