groovy git commit: GROOVY-7699: collate() on an empty list is an empty list. (closes #205)

2016-07-29 Thread paulk
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X ec1f3e3f0 -> 6778128eb


GROOVY-7699: collate() on an empty list is an empty list. (closes #205)


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

Branch: refs/heads/GROOVY_2_4_X
Commit: 6778128eb12c1a4672cc64add04080cdec9ced85
Parents: ec1f3e3
Author: Rahul Somasunderam 
Authored: Sat Dec 5 16:58:31 2015 -0800
Committer: paulk 
Committed: Fri Jul 29 20:50:53 2016 +1000

--
 .../groovy/runtime/DefaultGroovyMethods.java| 48 ++--
 src/test/groovy/CollateTest.groovy  |  4 +-
 2 files changed, 26 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/6778128e/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
--
diff --git a/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java 
b/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
index 38bf5f1..53b406d 100644
--- a/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
+++ b/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
@@ -3051,7 +3051,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 public static  List> collate(Iterable self, int size, int 
step, boolean keepRemainder) {
 List selfList = asList(self);
 List> answer = new ArrayList>();
-if (size <= 0 || selfList.isEmpty()) {
+if (size <= 0) {
 answer.add(selfList);
 } else {
 for (int pos = 0; pos < selfList.size() && pos > -1; pos += step) {
@@ -6223,7 +6223,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
  * @see #min(Iterable)
  * @since 1.0
  */
-@Deprecated 
+@Deprecated
 public static  T min(Collection self) {
 return GroovyCollections.min(self);
 }
@@ -11257,7 +11257,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 /**
  * Create a Collection composed of the intersection of both collections.  
Any
  * elements that exist in both collections are added to the resultant 
collection.
- * For collection of custom objects; objects should implement 
java.lang.Comparable  
+ * For collection of custom objects; objects should implement 
java.lang.Comparable
  * assert [4,5] == 
[1,2,3,4,5].intersect([4,5,6,7,8])
  *
  * @param left  a Collection
@@ -11293,7 +11293,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 /**
  * Create a Collection composed of the intersection of both iterables.  Any
  * elements that exist in both iterables are added to the resultant 
collection.
- * For collection of custom objects; objects should implement 
java.lang.Comparable  
+ * For collection of custom objects; objects should implement 
java.lang.Comparable
  * assert [4,5] == 
[1,2,3,4,5].intersect([4,5,6,7,8])
  *
  * @param left  an Iterable
@@ -14364,7 +14364,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 closure.call(i);
 }
 } else
-throw new GroovyRuntimeException("The argument (" + to + 
+throw new GroovyRuntimeException("The argument (" + to +
 ") to upto() cannot be less than the value (" + self + ") 
it's called on.");
 }
 
@@ -14384,7 +14384,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 closure.call(i);
 }
 } else
-throw new GroovyRuntimeException("The argument (" + to + 
+throw new GroovyRuntimeException("The argument (" + to +
 ") to upto() cannot be less than the value (" + self + ") 
it's called on.");
 }
 
@@ -14404,7 +14404,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 closure.call(i);
 }
 } else
-throw new GroovyRuntimeException("The argument (" + to + 
+throw new GroovyRuntimeException("The argument (" + to +
 ") to upto() cannot be less than the value (" + self + ") 
it's called on.");
 }
 
@@ -14424,7 +14424,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 closure.call(i);
 }
 } else
-throw new GroovyRuntimeException("The argument (" + to + 
+throw new GroovyRuntimeException("The argument (" + to +
 ") to upto() cannot be less than the value (" + self + ") 
it's called on.");

groovy git commit: GROOVY-7699: collate() on an empty list is an empty list. (closes #205)

2016-07-29 Thread paulk
Repository: groovy
Updated Branches:
  refs/heads/master dc2e10464 -> b8e4a5bc8


GROOVY-7699: collate() on an empty list is an empty list. (closes #205)


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

Branch: refs/heads/master
Commit: b8e4a5bc87fb015443c1e4dcd05165747facf76d
Parents: dc2e104
Author: Rahul Somasunderam 
Authored: Sat Dec 5 16:58:31 2015 -0800
Committer: paulk 
Committed: Fri Jul 29 20:49:37 2016 +1000

--
 .../groovy/runtime/DefaultGroovyMethods.java| 48 ++--
 src/test/groovy/CollateTest.groovy  |  4 +-
 2 files changed, 26 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/b8e4a5bc/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
--
diff --git a/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java 
b/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
index b5ebc64..d4915e8 100644
--- a/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
+++ b/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
@@ -3055,7 +3055,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 public static  List> collate(Iterable self, int size, int 
step, boolean keepRemainder) {
 List selfList = asList(self);
 List> answer = new ArrayList>();
-if (size <= 0 || selfList.isEmpty()) {
+if (size <= 0) {
 answer.add(selfList);
 } else {
 for (int pos = 0; pos < selfList.size() && pos > -1; pos += step) {
@@ -6306,7 +6306,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
  * @see #min(Iterable)
  * @since 1.0
  */
-@Deprecated 
+@Deprecated
 public static  T min(Collection self) {
 return GroovyCollections.min(self);
 }
@@ -11387,7 +11387,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 /**
  * Create a Collection composed of the intersection of both collections.  
Any
  * elements that exist in both collections are added to the resultant 
collection.
- * For collection of custom objects; objects should implement 
java.lang.Comparable  
+ * For collection of custom objects; objects should implement 
java.lang.Comparable
  * assert [4,5] == 
[1,2,3,4,5].intersect([4,5,6,7,8])
  *
  * @param left  a Collection
@@ -11423,7 +11423,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 /**
  * Create a Collection composed of the intersection of both iterables.  Any
  * elements that exist in both iterables are added to the resultant 
collection.
- * For collection of custom objects; objects should implement 
java.lang.Comparable  
+ * For collection of custom objects; objects should implement 
java.lang.Comparable
  * assert [4,5] == 
[1,2,3,4,5].intersect([4,5,6,7,8])
  *
  * @param left  an Iterable
@@ -14494,7 +14494,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 closure.call(i);
 }
 } else
-throw new GroovyRuntimeException("The argument (" + to + 
+throw new GroovyRuntimeException("The argument (" + to +
 ") to upto() cannot be less than the value (" + self + ") 
it's called on.");
 }
 
@@ -14514,7 +14514,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 closure.call(i);
 }
 } else
-throw new GroovyRuntimeException("The argument (" + to + 
+throw new GroovyRuntimeException("The argument (" + to +
 ") to upto() cannot be less than the value (" + self + ") 
it's called on.");
 }
 
@@ -14534,7 +14534,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 closure.call(i);
 }
 } else
-throw new GroovyRuntimeException("The argument (" + to + 
+throw new GroovyRuntimeException("The argument (" + to +
 ") to upto() cannot be less than the value (" + self + ") 
it's called on.");
 }
 
@@ -14554,7 +14554,7 @@ public class DefaultGroovyMethods extends 
DefaultGroovyMethodsSupport {
 closure.call(i);
 }
 } else
-throw new GroovyRuntimeException("The argument (" + to + 
+throw new GroovyRuntimeException("The argument (" + to +
 ") to upto() cannot be less than the value (" + self + ") 
it's called on.");
 }
 
@@ -145