You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2024/05/04 06:34:14 UTC
(groovy) branch master updated: minor refactor: replace deprecated method usage
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
The following commit(s) were added to refs/heads/master by this push:
new 950f397ed3 minor refactor: replace deprecated method usage
950f397ed3 is described below
commit 950f397ed3affac1aecad4ed0f71ee81addcd116
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat May 4 16:33:53 2024 +1000
minor refactor: replace deprecated method usage
---
src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy b/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
index 5cd913b118..2080c5e4b4 100644
--- a/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
+++ b/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
@@ -26,17 +26,11 @@ import picocli.CommandLine.Command
import picocli.CommandLine.Option
import picocli.CommandLine.Parameters
import picocli.CommandLine.ParentCommand
-import picocli.CommandLine.RunLast
import picocli.CommandLine.Unmatched
@SuppressWarnings('Println')
@Command(name = 'grape', description = 'Allows for the inspection and management of the local grape cache.',
- subcommands = [
- GrapeMain.Install,
- GrapeMain.Uninstall,
- GrapeMain.ListCommand,
- GrapeMain.Resolve,
- CommandLine.HelpCommand])
+ 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>()
@@ -71,7 +65,7 @@ class GrapeMain implements Runnable {
parser.subcommands.findAll { k, v -> k != 'help' }.each { k, v -> v.addMixin('helpOptions', new HelpOptionsMixin()) }
grape.parser = parser
- parser.parseWithHandler(new RunLast(), args)
+ parser.execute(args)
}
void run() {
@@ -282,7 +276,7 @@ class GrapeMain implements Runnable {
}
try {
def results = []
- def uris = Grape.resolve(* params)
+ def uris = Grape.resolve(*params)
if (!ivyFormatRequested) {
for (URI uri: uris) {
if (uri.scheme == 'file') {