Repository: ranger Updated Branches: refs/heads/master 4209b8d96 -> f2be7cdd6
RANGER-2146: Tag attribute type needs to be initialized to a non-empty string Project: http://git-wip-us.apache.org/repos/asf/ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/f2be7cdd Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/f2be7cdd Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/f2be7cdd Branch: refs/heads/master Commit: f2be7cdd65539c05153202b823af8953032e0649 Parents: 4209b8d Author: Abhay Kulkarni <[email protected]> Authored: Mon Jul 2 15:00:58 2018 -0700 Committer: Abhay Kulkarni <[email protected]> Committed: Mon Jul 2 15:00:58 2018 -0700 ---------------------------------------------------------------------- .../tagsync/source/atlasrest/RangerAtlasEntityWithTags.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ranger/blob/f2be7cdd/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java ---------------------------------------------------------------------- diff --git a/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java b/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java index c31c73c..6ce23e9 100644 --- a/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java +++ b/tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/RangerAtlasEntityWithTags.java @@ -22,7 +22,6 @@ import org.apache.atlas.type.AtlasClassificationType; import org.apache.atlas.type.AtlasStructType; import org.apache.atlas.type.AtlasTypeRegistry; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang.StringUtils; import org.apache.ranger.plugin.model.RangerValiditySchedule; import org.apache.ranger.tagsync.source.atlas.EntityNotificationWrapper; @@ -30,6 +29,8 @@ import java.util.List; import java.util.Map; public class RangerAtlasEntityWithTags { + static private final String DEFAULT_TAG_ATTRIBUTE_TYPE = "string"; + private final RangerAtlasEntity entity; private final List<EntityNotificationWrapper.RangerAtlasClassification> tags; private final AtlasTypeRegistry typeRegistry; @@ -55,7 +56,7 @@ public class RangerAtlasEntityWithTags { } public String getTagAttributeType(String tagTypeName, String tagAttributeName) { - String ret = StringUtils.EMPTY; + String ret = DEFAULT_TAG_ATTRIBUTE_TYPE; if (typeRegistry != null) { AtlasClassificationType classificationType = typeRegistry.getClassificationTypeByName(tagTypeName);
