psiroky commented on code in PR #205:
URL: https://github.com/apache/maven-enforcer/pull/205#discussion_r1057920952


##########
maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java:
##########
@@ -134,9 +147,7 @@ public void execute() throws MojoExecutionException {
         Log log = this.getLog();
 
         PluginParameterExpressionEvaluator evaluator = new 
PluginParameterExpressionEvaluator(session, mojoExecution);
-        if (commandLineRules != null && commandLineRules.length > 0) {
-            this.rules = createRulesFromCommandLineOptions();
-        }
+        this.rules = determineRulesToExecute();

Review Comment:
   I am not the biggest fan of this re-assignment to the instance field, but 
this is the current way of doing it, so I left it for now.
   
   I could potentially just create a local variable with the updated list and 
leave the fields be. This could be however considered a breaking change since 
the `getRules()` would then be returning different list than before (updated vs 
original).



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

Reply via email to