[ 
https://issues.apache.org/jira/browse/SLING-8077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16676785#comment-16676785
 ] 

ASF GitHub Bot commented on SLING-8077:
---------------------------------------

bosschaert commented on a change in pull request #2: SLING-8077 - refactor 
ContentorderMergeProcessor to MergeHandler adju…
URL: 
https://github.com/apache/sling-org-apache-sling-feature-extension-content/pull/2#discussion_r231129960
 
 

 ##########
 File path: 
src/main/java/org/apache/sling/feature/extension/content/ContentOrderMergeProcessor.java
 ##########
 @@ -51,6 +51,9 @@ public boolean canMerge(Extension extension) {
 
     @Override
     public void merge(HandlerContext context, Feature target, Feature source, 
Extension targetEx, Extension sourceEx) {
+        if (target == null) {
+            return;
 
 Review comment:
   Sorry - I was wrong. Instead of just returning, it should be:
   ```
   if (target == null) {
       target.getExtensions().add(sourceEx)
       return;
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Transform ContentOrderMergeProcessor into MergeHandler
> ------------------------------------------------------
>
>                 Key: SLING-8077
>                 URL: https://issues.apache.org/jira/browse/SLING-8077
>             Project: Sling
>          Issue Type: Improvement
>          Components: Feature Model
>            Reporter: Dominik Süß
>            Priority: Major
>
> ContentOrderMergeProcessor as implemented in "Featuremodel - Content 
> Deployment Exension" currently postprocesses features after merge to set the 
> default start-order. this only works for cases where features with same order 
> are getting merged and mandates a sequential merge of features of different 
> order. 
> To tackle this issue the extension should take over the actual merge which 
> allows to preprocess the features before merging and setting the defaults 
> according to the defaults declared in the particular features before doing 
> the merge.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to