desruisseaux commented on PR #2236:
URL: https://github.com/apache/maven/pull/2236#issuecomment-2876831686

   If the discussion is about avoiding to reassign parameter values, those best 
practices are guidelines, often improving software but not always. For example, 
reassigning a parameter with something unrelated is dangerous. In that case, 
the best practice applies. But reassigning a parameter with a "fixed" (from the 
perspective of what the method wants to do) value can be good since it 
guarantees that the potentially broken value is never used. For example, if a 
method said that it ignores leading and trailing spaces, doing `arg = 
arg.strip()` at the beginning guarantees the "wrong" (from method's 
perspective) value with spaces will never be used.


-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to