groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Trivial refactoring
Date Mon, 11 Dec 2017 09:45:59 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X f6bf4bdb2 -> d1dc3df6a


Trivial refactoring

(cherry picked from commit 67db12f)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/d1dc3df6
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/d1dc3df6
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/d1dc3df6

Branch: refs/heads/GROOVY_2_4_X
Commit: d1dc3df6a70e4c329238e4f8b0194589e8d39773
Parents: f6bf4bd
Author: sunlan <sunlan@apache.org>
Authored: Mon Dec 11 17:41:54 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Mon Dec 11 17:45:55 2017 +0800

----------------------------------------------------------------------
 src/main/groovy/util/GroovyScriptEngine.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/d1dc3df6/src/main/groovy/util/GroovyScriptEngine.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/util/GroovyScriptEngine.java b/src/main/groovy/util/GroovyScriptEngine.java
index 0880dee..73c2a27 100644
--- a/src/main/groovy/util/GroovyScriptEngine.java
+++ b/src/main/groovy/util/GroovyScriptEngine.java
@@ -507,7 +507,7 @@ public class GroovyScriptEngine implements ResourceConnector {
         if (urls == null) return null;
         URL[] roots = new URL[urls.length];
         for (int i = 0; i < roots.length; i++) {
-            if (urls[i].indexOf("://") != -1) {
+            if (urls[i].contains("://")) {
                 roots[i] = new URL(urls[i]);
             } else {
                 roots[i] = new File(urls[i]).toURI().toURL();


Mime
View raw message