mthmulders commented on a change in pull request #286:
URL: https://github.com/apache/maven/pull/286#discussion_r439852064



##########
File path: 
maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java
##########
@@ -285,6 +275,16 @@ public ModelSource resolveModel( final Dependency 
dependency )
             }
 
             dependency.setVersion( 
versionRangeResult.getHighestVersion().toString() );
+            
+            if ( modelPool != null )
+            {
+                Model model = Optional.ofNullable( modelPool.get( 
dependency.getGroupId(), dependency.getArtifactId(),

Review comment:
       `Optional.ofNullable(....).orElse(null)` seems like a code smell to me.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to