mbien commented on code in PR #5091:
URL: https://github.com/apache/netbeans/pull/5091#discussion_r1048691219
##########
java/maven/src/org/netbeans/modules/maven/api/output/OutputUtils.java:
##########
@@ -241,8 +258,12 @@ public ProjectStacktraceOutputListener(Project project) {
protected ClassPath getClassPath() {
Project prj = ref.get();
if(prj != null) {
- ClassPath[] cp =
prj.getLookup().lookup(ProjectSourcesClassPathProvider.class).getProjectClassPaths(ClassPath.EXECUTE);
- return ClassPathSupport.createProxyClassPath(cp);
+ ProjectSourcesClassPathProvider prov =
prj.getLookup().lookup(ProjectSourcesClassPathProvider.class);
+ List<ClassPath> cp = Stream.concat(
+ Stream.of(prov.getProjectClassPaths(ClassPath.BOOT)),
+
Stream.of(prov.getProjectClassPaths(ClassPath.EXECUTE)))
+ .collect(Collectors.toList());
Review Comment:
i rather not start playing with indices unless there is a good reason for
that. I am more concerned about correctness and readability here.
A proper implementation will probably have to retain the module info
somehow. But this should work in many if not most cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists