sdedic commented on code in PR #6514:
URL: https://github.com/apache/netbeans/pull/6514#discussion_r1343966516


##########
java/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java:
##########
@@ -374,7 +391,8 @@ public MavenProject loadParentOf(MavenEmbedder embedder, 
MavenProject project) t
         request.setRepositorySession(maven.newRepositorySession(req));
 
         if (project.getParentFile() != null) {
-            parent = builder.build(project.getParentFile(), 
request).getProject();

Review Comment:
   Former call to `DefaultProjectBuilder.build` does not contain error handling 
/ processing as implemented in `MavenProjectCache`. The other branch works with 
(nonlocal) artifacts, it is still TBD but serves mainly as a fallback.



##########
java/maven/src/org/netbeans/modules/maven/execute/ReactorChecker.java:
##########
@@ -94,7 +91,7 @@ public class ReactorChecker implements PrerequisitesChecker {
      * @return its apparent reactor root; maybe just the same project
      */
     public static @NonNull NbMavenProject findReactor(@NonNull NbMavenProject 
module) { // #197232
-        MavenProject prj = module.getMavenProject();

Review Comment:
   This is important, as a subproject cannot be typically read with empty Maven 
repository. But the partial project contains a correct parent reference.



##########
java/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java:
##########
@@ -544,12 +578,6 @@ void stopHardReferencingMavenPoject() {
                 model = null;
             }
             newproject = MavenProjectCache.getMavenProject(this.getPOMFile(), 
reload);

Review Comment:
   getMavenProject never returns `null`, but a fallback can be returned.



-- 
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

Reply via email to