Skip to content

Commit

Permalink
#16376 set null properties map last (#16419)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilvam committed Apr 17, 2019
1 parent ec5c41c commit 190aad4
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -4278,10 +4278,14 @@ public void copyProperties(final Contentlet contentlet, final Map<String, Object
}
}


for (Map.Entry<String, Object> property : properties.entrySet()) {
String conVariable = property.getKey();
Object value = property.getValue();
try{
if(conVariable.equals(Contentlet.NULL_PROPERTIES)) {
continue;
}
if(conVariable.equals(Contentlet.INODE_KEY)){
contentlet.setInode((String)value);
}else if(conVariable.equals(Contentlet.LANGUAGEID_KEY)){
Expand Down Expand Up @@ -4345,7 +4349,12 @@ public void copyProperties(final Contentlet contentlet, final Map<String, Object
Logger.error(this,"IO Error in copying Binary File object ", ioe);
}

}

//if we have a nullProperties variable, it needs to be the last one set
if(UtilMethods.isSet(properties.get(Contentlet.NULL_PROPERTIES))) {
contentlet.setProperty(Contentlet.NULL_PROPERTIES,
properties.get(Contentlet.NULL_PROPERTIES));
}

// workflow
Expand Down

0 comments on commit 190aad4

Please sign in to comment.