chadwick00 commented on code in PR #218:
URL:
https://github.com/apache/maven-dependency-plugin/pull/218#discussion_r1331584239
##########
src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java:
##########
@@ -215,7 +216,7 @@
* @since 2.10
*/
@Parameter
- private String[] ignoredUsedUndeclaredDependencies = new String[0];
+ private final String[] ignoredUsedUndeclaredDependencies = new String[0];
Review Comment:
Although looking back through the code again, I probably did this to remind
myself that these aren't mutated by the code. Presumably only a mad-man would
write code that would change the contents of a Mojo parameter, even if the
compiler allowed them to.
##########
src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java:
##########
@@ -215,7 +216,7 @@
* @since 2.10
*/
@Parameter
- private String[] ignoredUsedUndeclaredDependencies = new String[0];
+ private final String[] ignoredUsedUndeclaredDependencies = new String[0];
Review Comment:
Although looking back through the code again, I probably did this to remind
myself that these aren't mutated by the code. Presumably only a mad-man would
write code that would change the contents of a Mojo parameter, even if the
compiler allowed them to?
--
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]