This is an automated email from the ASF dual-hosted git repository. sunlan pushed a commit to branch GROOVY_3_0_X in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 7fbbfa0f89c8a48f72b594db4b57f1a14a4c4e35 Author: Daniel Sun <[email protected]> AuthorDate: Sat Mar 14 20:08:35 2020 +0800 Trivial refactoring: Use safer parameter type with generics further As the generics will be erased, no binary compatibility issue was introduced here (cherry picked from commit 70e40116bfe37678713e8d3e0d195259f5d6c70f) --- src/main/java/groovy/lang/GroovyShell.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/groovy/lang/GroovyShell.java b/src/main/java/groovy/lang/GroovyShell.java index 325b99d..f7d485b 100644 --- a/src/main/java/groovy/lang/GroovyShell.java +++ b/src/main/java/groovy/lang/GroovyShell.java @@ -345,8 +345,8 @@ public class GroovyShell extends GroovyObjectSupport { * @param source is the source content of the script * @param args the command line arguments to pass in */ - public Object run(GroovyCodeSource source, List args) throws CompilationFailedException { - return run(source, ((String[]) args.toArray(EMPTY_STRING_ARRAY))); + public Object run(GroovyCodeSource source, List<String> args) throws CompilationFailedException { + return run(source, args.toArray(EMPTY_STRING_ARRAY)); } /** @@ -366,8 +366,8 @@ public class GroovyShell extends GroovyObjectSupport { * @param source is the source content of the script * @param args the command line arguments to pass in */ - public Object run(URI source, List args) throws CompilationFailedException, IOException { - return run(new GroovyCodeSource(source), ((String[]) args.toArray(EMPTY_STRING_ARRAY))); + public Object run(URI source, List<String> args) throws CompilationFailedException, IOException { + return run(new GroovyCodeSource(source), args.toArray(EMPTY_STRING_ARRAY)); } /**
