You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by pa...@apache.org on 2015/05/19 07:34:39 UTC

[2/3] incubator-groovy git commit: GROOVY-7425: Addressing code review comments by paulk-asert

GROOVY-7425: Addressing code review comments by paulk-asert


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

Branch: refs/heads/master
Commit: 9a7c32055dedf73754e70d74398bde16334b2465
Parents: 4842f62
Author: Esteban <eg...@gmail.com>
Authored: Fri May 15 08:28:28 2015 -0700
Committer: Paul King <pa...@asert.com.au>
Committed: Tue May 19 15:33:20 2015 +1000

----------------------------------------------------------------------
 .../org/codehaus/groovy/runtime/ResourceGroovyMethods.java     | 2 +-
 src/test/org/codehaus/groovy/runtime/URLGetBytesTest.groovy    | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/9a7c3205/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java b/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
index 35e8f42..ce49168 100644
--- a/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
+++ b/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
@@ -709,7 +709,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param parameters connection parameters
      * @return the byte[] from that URL
      * @throws IOException if an IOException occurs.
-     * @since 2.4.1
+     * @since 2.4.4
      */
     public static byte[] getBytes(URL url, Map parameters) throws IOException {
         return IOGroovyMethods.getBytes(configuredInputStream(parameters, url));

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/9a7c3205/src/test/org/codehaus/groovy/runtime/URLGetBytesTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/URLGetBytesTest.groovy b/src/test/org/codehaus/groovy/runtime/URLGetBytesTest.groovy
index 704c2a7..2914572 100644
--- a/src/test/org/codehaus/groovy/runtime/URLGetBytesTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/URLGetBytesTest.groovy
@@ -21,10 +21,10 @@ package org.codehaus.groovy.runtime
  */
 class URLGetBytesTest extends GroovyTestCase {
     void testGetBytesFromURLWithParameters() {
-        def url = new URL('http','groovy.codehaus.org',80, '/', new URLStreamHandler() {
+        def url = new URL('http','groovy-lang.org',80, '/', new URLStreamHandler() {
             @Override
             protected URLConnection openConnection(URL u) {
-                new DummyURLConnection(new URL('http://groovy.codehaus.org'))
+                new DummyURLConnection(new URL('http://groovy-lang.org'))
             }
 
         })
@@ -49,8 +49,6 @@ class URLGetBytesTest extends GroovyTestCase {
 
         assert url.getBytes(useCaches:true, requestProperties:[a:'b']) == 'Groovy cached a:b'.bytes
 
-        assert url.getBytes() == url.getBytes()
-
         assert url.getBytes() == url.getBytes((Map)null)
     }