Repository: ranger Updated Branches: refs/heads/master ceaed3f3d -> cf69754ad
RANGER-2054:Fix new findBugs in RangerAdminClientImpl.java for kylin plugin test Signed-off-by: peng.jianhua <peng.jian...@zte.com.cn> Project: http://git-wip-us.apache.org/repos/asf/ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/cf69754a Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/cf69754a Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/cf69754a Branch: refs/heads/master Commit: cf69754ad3018bcea1846b1bfb0a05d05b3d557a Parents: ceaed3f Author: zhangqiang2 <zhangqia...@zte.com.cn> Authored: Mon Apr 2 15:07:46 2018 +0800 Committer: peng.jianhua <peng.jian...@zte.com.cn> Committed: Tue Apr 3 09:44:05 2018 +0800 ---------------------------------------------------------------------- .../authorization/kylin/authorizer/RangerAdminClientImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ranger/blob/cf69754a/plugin-kylin/src/test/java/org/apache/ranger/authorization/kylin/authorizer/RangerAdminClientImpl.java ---------------------------------------------------------------------- diff --git a/plugin-kylin/src/test/java/org/apache/ranger/authorization/kylin/authorizer/RangerAdminClientImpl.java b/plugin-kylin/src/test/java/org/apache/ranger/authorization/kylin/authorizer/RangerAdminClientImpl.java index 0c465b3..926a211 100644 --- a/plugin-kylin/src/test/java/org/apache/ranger/authorization/kylin/authorizer/RangerAdminClientImpl.java +++ b/plugin-kylin/src/test/java/org/apache/ranger/authorization/kylin/authorizer/RangerAdminClientImpl.java @@ -18,6 +18,7 @@ package org.apache.ranger.authorization.kylin.authorizer; import java.io.File; +import java.nio.charset.Charset; import java.nio.file.FileSystems; import java.nio.file.Files; import java.util.List; @@ -65,7 +66,7 @@ public class RangerAdminClientImpl implements RangerAdminClient { .getPath(basedir, "/src/test/resources/" + cacheFilename); byte[] cacheBytes = Files.readAllBytes(cachePath); - return gson.fromJson(new String(cacheBytes), ServicePolicies.class); + return gson.fromJson(new String(cacheBytes, Charset.defaultCharset()), ServicePolicies.class); } @Override