groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Rename `whichJar` to `where`
Date Tue, 24 Apr 2018 10:47:24 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X e5317d758 -> 020f79991


Rename `whichJar` to `where`

(cherry picked from commit e6083d4)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 020f79991e4ea821d23cd750252aa4fad03e7c99
Parents: e5317d7
Author: sunlan <sunlan@apache.org>
Authored: Tue Apr 24 18:46:49 2018 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Tue Apr 24 18:47:18 2018 +0800

----------------------------------------------------------------------
 .../java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java   | 2 +-
 .../org/codehaus/groovy/runtime/DefaultGroovyMethodsTest.groovy  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/020f7999/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
index c1e8933..6441c68 100644
--- a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
@@ -606,7 +606,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport
{
      * @return the url of the jar, {@code null} if the specified class is from JDK
      * @since 2.5.0
      */
-    public static URL whichJar(Class self) {
+    public static URL where(Class self) {
         CodeSource codeSource = self.getProtectionDomain().getCodeSource();
 
         if (null == codeSource) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/020f7999/src/test/org/codehaus/groovy/runtime/DefaultGroovyMethodsTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/DefaultGroovyMethodsTest.groovy b/src/test/org/codehaus/groovy/runtime/DefaultGroovyMethodsTest.groovy
index 8ad57c4..95fb2c8 100644
--- a/src/test/org/codehaus/groovy/runtime/DefaultGroovyMethodsTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/DefaultGroovyMethodsTest.groovy
@@ -309,7 +309,7 @@ class DefaultGroovyMethodsTest extends GroovyTestCase {
     }
 
     void testWhichJar() {
-        assert DefaultGroovyMethods.whichJar(org.objectweb.asm.Opcodes).getFile().matches(/(.+\/)?asm[-].+\.jar/)
-        assert null == DefaultGroovyMethods.whichJar(String)
+        assert DefaultGroovyMethods.where(org.objectweb.asm.Opcodes).getFile().matches(/(.+\/)?asm[-].+\.jar/)
+        assert null == DefaultGroovyMethods.where(String)
     }
 }


Mime
View raw message