You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2019/02/01 16:56:52 UTC
[sling-org-apache-sling-feature-extension-content] 18/46:
SLING-8077 - fixing flawed patch of null scenario - scenario to be covered
is a missing extension in target that exists in source - so extension needs
to be added to target.
This is an automated email from the ASF dual-hosted git repository.
davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-extension-content.git
commit ea21a93caf53329a30960e179202490fbd43ead4
Author: Dominik Suess <su...@adobe.com>
AuthorDate: Tue Nov 6 17:21:38 2018 +0100
SLING-8077 - fixing flawed patch of null scenario - scenario to be covered is a missing extension in target that exists in source - so extension needs to be added to target.
---
.../sling/feature/extension/content/ContentOrderMergeProcessor.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java b/src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java
index c2df12f..05b1133 100644
--- a/src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java
+++ b/src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java
@@ -51,7 +51,8 @@ public class ContentOrderMergeProcessor implements MergeHandler {
@Override
public void merge(HandlerContext context, Feature target, Feature source, Extension targetEx, Extension sourceEx) {
- if (target == null) {
+ if (targetEx == null) {
+ target.getExtensions().add(sourceEx);
return;
}
processFeature(context, target, targetEx);