lbownik commented on code in PR #5091:
URL: https://github.com/apache/netbeans/pull/5091#discussion_r1047435684
##########
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:
if this code is being tuched anyway, why not removing this ugly "new Object
[] {" and let the compiler do it for us?
--
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