ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhangqi...@apache.org
Subject ranger git commit: RANGER-1441 - Remove MapUtils.EMPTY_MAP
Date Fri, 10 Mar 2017 03:27:19 GMT
Repository: ranger
Updated Branches:
  refs/heads/master 432f9f7ac -> a118f7100


RANGER-1441 - Remove MapUtils.EMPTY_MAP

Signed-off-by: zhangqiang2 <zhangqiang2@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/a118f710
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/a118f710
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/a118f710

Branch: refs/heads/master
Commit: a118f7100d33d39c2d0c6a99d50769492af444e9
Parents: 432f9f7
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Mar 9 11:50:00 2017 +0000
Committer: zhangqiang2 <zhangqiang2@zte.com.cn>
Committed: Thu Mar 9 22:06:14 2017 -0500

----------------------------------------------------------------------
 .../ranger/tagsync/source/atlas/AtlasNotificationMapper.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/a118f710/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
----------------------------------------------------------------------
diff --git a/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
b/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
index 922317e..b2a7e1e 100644
--- a/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
+++ b/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java
@@ -36,6 +36,7 @@ import org.apache.ranger.plugin.model.RangerTagDef.RangerTagAttributeDef;
 import org.apache.ranger.plugin.util.ServiceTags;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -161,9 +162,9 @@ public class AtlasNotificationMapper {
 			ret = buildServiceTags(entityWithTraits, null);
 			if (ret != null) {
 				// tag-definitions should NOT be deleted as part of service-resource delete
-				ret.setTagDefinitions(MapUtils.EMPTY_MAP);
+				ret.setTagDefinitions(Collections.<Long, RangerTagDef>emptyMap());
 				// Ranger deletes tags associated with deleted service-resource
-				ret.setTags(MapUtils.EMPTY_MAP);
+				ret.setTags(Collections.<Long, RangerTag>emptyMap());
 			}
 		}
 


Mime
View raw message