This is an automated email from the ASF dual-hosted git repository.

sarath pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new e9f55d3  ATLAS-3381: Atlas Patch Handler: Patch Handlers Not 
Committing Changes #2 Improved check to detect classification presence
e9f55d3 is described below

commit e9f55d35276279beb01546f6cf0c0248f5506ac2
Author: Ashutosh Mestry <[email protected]>
AuthorDate: Tue Aug 20 09:04:54 2019 -0700

    ATLAS-3381: Atlas Patch Handler: Patch Handlers Not Committing Changes #2 
Improved check to detect classification presence
    
    Signed-off-by: Sarath Subramanian <[email protected]>
    (cherry picked from commit 0d5c22298cacdf95531757048fd4b1596ed3b044)
---
 .../org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
index 145e700..8ddbf74 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
@@ -36,6 +36,7 @@ import org.apache.atlas.model.instance.EntityMutationResponse;
 import org.apache.atlas.model.instance.EntityMutations.EntityOperation;
 import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
 import 
org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.Cardinality;
+import org.apache.atlas.repository.Constants;
 import org.apache.atlas.repository.RepositoryException;
 import org.apache.atlas.repository.converters.AtlasInstanceConverter;
 import org.apache.atlas.repository.graph.FullTextMapperV2;
@@ -1697,7 +1698,8 @@ public class EntityGraphMapper {
     }
 
     public void updateClassificationTextAndNames(AtlasVertex vertex) throws 
AtlasBaseException {
-        if (StringUtils.isEmpty(vertex.getProperty(CLASSIFICATION_NAMES_KEY, 
String.class))) {
+        
if(CollectionUtils.isEmpty(vertex.getPropertyValues(Constants.TRAIT_NAMES_PROPERTY_KEY,
 String.class)) &&
+                
CollectionUtils.isEmpty(vertex.getPropertyValues(Constants.PROPAGATED_TRAIT_NAMES_PROPERTY_KEY,
 String.class))) {
             return;
         }
 

Reply via email to