Skip to content
Permalink
Browse files
Addressing PR feedback
  • Loading branch information
klcodanr committed Mar 10, 2022
1 parent 6ae6017 commit 05509c9dd2d390bd818354dccc882e2917c6931f
Showing 1 changed file with 4 additions and 4 deletions.
@@ -149,7 +149,7 @@ private static String mergeProperty(String path, String property, JsonObject anc
} else if (Objects.equals(ap, cp)) {
return pp;
} else if (ap == null) {
return cp;
return cp; // if property doesn't exist in the ancestor, prefer customization over the product value
} else {
conflicts.add("Could not merge value; path=" + path + " property=" + property + "; ancestor=" + ap + "; custom=" + cp
+ "; product=" + pp);
@@ -165,9 +165,9 @@ private static JsonObject mergeChild(String path, String child, int level, JsonO
if (level == 0 && USE_PRODUCT_CHILD_LEVEL_0.contains(child)) {
return p;
}
if(c == null && p != null){
return p;
}else if (isSameJson(a, p) || isSameJson(c, p)) {
if (c == null && p != null) {
return p; // restore child nodes in product index if removed in custom index
} else if (isSameJson(a, p) || isSameJson(c, p)) {
return c;
} else if (isSameJson(a, c)) {
return p;

0 comments on commit 05509c9

Please sign in to comment.