RANGER-839: Changed to httpclient version to 4.3.6 as 4.5.2 has some issues on hadoop common. Also removed old commons-httpclient dependencies in security admin & ugsync modules
Signed-off-by: Velmurugan Periasamy <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/be746596 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/be746596 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/be746596 Branch: refs/heads/master Commit: be74659686ffffbd31146242825385280df07342 Parents: 88d82ae Author: Sailaja Polavarapu <[email protected]> Authored: Mon May 23 09:57:15 2016 -0700 Committer: Velmurugan Periasamy <[email protected]> Committed: Mon May 23 14:06:20 2016 -0400 ---------------------------------------------------------------------- pom.xml | 3 +-- security-admin/pom.xml | 9 ++++----- src/main/assembly/usersync.xml | 2 +- ugsync/pom.xml | 5 ----- .../org/apache/ranger/usersync/util/UserSyncUtil.java | 10 +++++----- 5 files changed, 11 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/be746596/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index d6aa833..327f30c 100644 --- a/pom.xml +++ b/pom.xml @@ -140,7 +140,6 @@ <commons.configuration.version>1.10</commons.configuration.version> <commons.dbcp.version>1.4</commons.dbcp.version> <commons.digester.version>2.1</commons.digester.version> - <commons.httpclient.version>3.1</commons.httpclient.version> <commons.io.version>2.4</commons.io.version> <commons.lang.version>2.6</commons.lang.version> <commons.logging.version>1.2</commons.logging.version> @@ -164,7 +163,7 @@ <hbase.version>1.1.3</hbase.version> <hive.version>2.1.0-SNAPSHOT</hive.version> <htrace-core.version>3.1.0-incubating</htrace-core.version> - <httpcomponents.httpclient.version>4.5.1</httpcomponents.httpclient.version> + <httpcomponents.httpclient.version>4.3.6</httpcomponents.httpclient.version> <httpcomponents.httpcore.version>4.4.3</httpcomponents.httpcore.version> <httpcomponents.httpmime.version>4.5.1</httpcomponents.httpmime.version> <jackson.version>1.9.13</jackson.version> http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/be746596/security-admin/pom.xml ---------------------------------------------------------------------- diff --git a/security-admin/pom.xml b/security-admin/pom.xml index 9f4ecbe..25980fc 100644 --- a/security-admin/pom.xml +++ b/security-admin/pom.xml @@ -113,11 +113,6 @@ <version>${tomcat.embed.version}</version> </dependency> <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>${commons.httpclient.version}</version> - </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>${commons.io.version}</version> @@ -336,6 +331,10 @@ <artifactId>hadoop-common</artifactId> <version>${hadoop-common.version}</version> <exclusions> + <exclusion> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + </exclusion> <exclusion> <groupId>javax.servlet</groupId> <artifactId>*</artifactId> http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/be746596/src/main/assembly/usersync.xml ---------------------------------------------------------------------- diff --git a/src/main/assembly/usersync.xml b/src/main/assembly/usersync.xml index e60aae0..2f7bea7 100644 --- a/src/main/assembly/usersync.xml +++ b/src/main/assembly/usersync.xml @@ -51,7 +51,7 @@ <include>org.apache.ranger:ranger-util</include> <include>commons-io:commons-io:jar:${commons.io.version}</include> <include>org.apache.htrace:htrace-core</include> - <include>commons-httpclient:commons-httpclient</include> + <include>org.apache.httpcomponents:httpclient:jar:${httpcomponents.httpclient.version}</include> <include>commons-codec:commons-codec</include> <include>org.apache.ranger:ranger-plugins-common</include> </includes> http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/be746596/ugsync/pom.xml ---------------------------------------------------------------------- diff --git a/ugsync/pom.xml b/ugsync/pom.xml index f18043c..489cb7c 100644 --- a/ugsync/pom.xml +++ b/ugsync/pom.xml @@ -102,11 +102,6 @@ <artifactId>junit</artifactId> </dependency> <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>${commons.httpclient.version}</version> - </dependency> - <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>${commons.codec.version}</version> http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/be746596/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java ---------------------------------------------------------------------- diff --git a/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java b/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java index 050419d..1ac2da2 100644 --- a/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java +++ b/ugsync/src/main/java/org/apache/ranger/usersync/util/UserSyncUtil.java @@ -19,18 +19,18 @@ package org.apache.ranger.usersync.util; -import org.apache.commons.httpclient.URIException; -import org.apache.commons.httpclient.util.URIUtil; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; public class UserSyncUtil { - public static String encodeURIParam(String s) throws URIException { + public static String encodeURIParam(String s) throws UnsupportedEncodingException { String ret = null; try { - ret = URIUtil.encodeQuery(s); - } catch (URIException e) { + ret = URLEncoder.encode(s, "UTF-8"); + } catch (UnsupportedEncodingException e) { throw e; }
