This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy.git
commit f83c8cb3f0cf7eebf867a6d0e5df552426c0cdd4 Author: Paul King <pa...@asert.com.au> AuthorDate: Tue Sep 3 19:27:17 2024 +1000 avoid codenarc warning --- src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy b/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy index 5b0ebe09e9..e3eba5682d 100644 --- a/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy +++ b/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy @@ -33,7 +33,7 @@ import picocli.CommandLine.Unmatched subcommands = [Install, Uninstall, ListCommand, Resolve, CommandLine.HelpCommand]) class GrapeMain implements Runnable { @Option(names = ['-D', '--define'], description = 'define a system property', paramLabel = '<name=value>') - private final Map<String, String> properties = new LinkedHashMap<String, String>() + private final Map<String, String> sysProperties = new LinkedHashMap<String, String>() @SuppressWarnings('UnusedPrivateField') // used in run() @Option(names = ['-r', '--resolver'], description = 'define a grab resolver (for install)', paramLabel = '<url>') @@ -78,7 +78,7 @@ class GrapeMain implements Runnable { @SuppressWarnings('UnusedPrivateMethod') // used in run() private void init() { - properties.each { k, v -> + sysProperties.each { k, v -> System.setProperty(k, v) } }