mbien commented on code in PR #5091:
URL: https://github.com/apache/netbeans/pull/5091#discussion_r1049088228
##########
java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java:
##########
@@ -672,12 +603,14 @@ public ClassPath getActiveClassPath() {
ClassPath ret = active;
if (ret == null) {
MavenProject mp = proj.getOriginalMavenProject();
- boolean hasMainModuleDescriptor =
mp.getCompileSourceRoots().stream().anyMatch((sourceRoot) -> (new
File(sourceRoot, MODULE_INFO_JAVA).exists()));
+ boolean hasMainModuleDescriptor =
mp.getCompileSourceRoots().stream()
+ .anyMatch((sourceRoot) ->
Files.exists(Paths.get(sourceRoot, MODULE_INFO_JAVA)));
if(hasMainModuleDescriptor) {
LOGGER.log(Level.FINER, "TestPathSelector {0} for project
{1}: has main module-info.java", new Object [] {logDesc,
proj.getProjectDirectory().getPath()}); // NOI18N
Review Comment:
the advantage of this is to delay when the toString() method is called to
the point the logging lib is building the message, it doesn't make a difference
in this particular case but the whole class is using this way of logging. I
don't really feel the need to rewrite it all.
--
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