KYLIN-1266 Add back commons-collections, but a shared version not collections4


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

Branch: refs/heads/2.x-staging
Commit: 8d76b7604f113f5c77669fb222eaa6e958f62b98
Parents: 6e78e4e
Author: Li, Yang <yang...@ebay.com>
Authored: Wed Dec 30 16:55:00 2015 +0800
Committer: Li, Yang <yang...@ebay.com>
Committed: Wed Dec 30 16:55:00 2015 +0800

----------------------------------------------------------------------
 core-common/pom.xml                             |  4 +++
 .../kylin/common/util/CollectionUtils.java      | 29 --------------------
 .../validation/rule/AggregationGroupRule.java   |  2 +-
 pom.xml                                         |  6 ++++
 4 files changed, 11 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/8d76b760/core-common/pom.xml
----------------------------------------------------------------------
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 72d8808..07a7ee1 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -49,6 +49,10 @@
             <artifactId>commons-lang3</artifactId>
         </dependency>
         <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+        </dependency>
+        <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/kylin/blob/8d76b760/core-common/src/main/java/org/apache/kylin/common/util/CollectionUtils.java
----------------------------------------------------------------------
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/util/CollectionUtils.java 
b/core-common/src/main/java/org/apache/kylin/common/util/CollectionUtils.java
deleted file mode 100644
index c4b7d1d..0000000
--- 
a/core-common/src/main/java/org/apache/kylin/common/util/CollectionUtils.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.apache.kylin.common.util;
-
-import java.util.Collection;
-
-public class CollectionUtils {
-
-    public static boolean isEmpty(final Collection<?> coll) {
-        return coll == null || coll.isEmpty();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/kylin/blob/8d76b760/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
----------------------------------------------------------------------
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
index 40555c2..222288a 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
@@ -22,7 +22,7 @@ import java.util.Arrays;
 import java.util.Set;
 import java.util.TreeSet;
 
-import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.cube.model.AggregationGroup;
 import org.apache.kylin.cube.model.CubeDesc;

http://git-wip-us.apache.org/repos/asf/kylin/blob/8d76b760/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9311691..74bac02 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,6 +64,7 @@
         <commons-cli.version>1.2</commons-cli.version>
         <commons-lang.version>2.6</commons-lang.version>
         <commons-lang3.version>3.1</commons-lang3.version>
+        <commons-collections.version>3.2.1</commons-collections.version>
         <commons-io.version>2.4</commons-io.version>
         <commons-daemon.version>1.0.15</commons-daemon.version>
         <commons-httpclient.version>3.1</commons-httpclient.version>
@@ -329,6 +330,11 @@
                 <version>${commons-lang3.version}</version>
             </dependency>
             <dependency>
+                <groupId>commons-collections</groupId>
+                <artifactId>commons-collections</artifactId>
+                <version>${commons-collections.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>org.apache.commons</groupId>
                 <artifactId>commons-math3</artifactId>
                 <version>${commons-math3.version}</version>

Reply via email to