This is an automated email from the ASF dual-hosted git repository.
sunlan 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 70e4011 Trivial refactoring: Use safer parameter type with generics
further
70e4011 is described below
commit 70e40116bfe37678713e8d3e0d195259f5d6c70f
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
---
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));
}
/**