dehasi commented on a change in pull request #347:
URL: https://github.com/apache/maven/pull/347#discussion_r628796390



##########
File path: 
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
##########
@@ -482,6 +500,68 @@ else if ( !parentIds.add( parentData.getId() ) )
         return resultModel;
     }
 
+    private Map<String, Activation> getInterpolatedActivations( Model rawModel,
+                                                                
DefaultProfileActivationContext context,
+                                                                
DefaultModelProblemCollector problems )
+    {
+        Map<String, Activation> interpolatedActivations = 
getProfileActivations( rawModel, true );
+        for ( Activation activation : interpolatedActivations.values() )
+        {
+            if ( activation.getFile() != null )
+            {
+                replaceWithInterpolatedValue( activation.getFile(), context, 
problems );
+            }
+        }
+        return interpolatedActivations;
+    }
+
+    private void replaceWithInterpolatedValue( ActivationFile activationFile, 
ProfileActivationContext context,
+                                               DefaultModelProblemCollector 
problems  )
+    {
+        String path;
+        boolean missing;

Review comment:
       @elharo Moving everything inside one `if-else` block under `try` makes 
it simpler. But, I still need `path` and `missing` to build an error message. 
For me, recalculating them in the `catch` block only adds complexity. Can we 
leave them? Or you want me to reduce the error message?
   




-- 
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:
us...@infra.apache.org


Reply via email to