Oscar Scholten pushed to branch bugfix/REPO-1759 at cms-community / 
hippo-repository


Commits:
f3b1ce1f by Oscar Scholten at 2017-08-08T17:10:36+02:00
REPO-1759 Improve code layout in #removeDescendantDefinitions

- - - - -


1 changed file:

- 
engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java


Changes:

=====================================
engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java
=====================================
--- 
a/engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java
+++ 
b/engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java
@@ -695,10 +695,10 @@ public class DefinitionMergeService {
         for (final ConfigurationNodeImpl childConfigNode : 
configNode.getNodes().values()) {
             for (final DefinitionNodeImpl childDefItem : 
childConfigNode.getDefinitions()) {
                 // if child's DefinitionNode was part of a parent Definition, 
it may have already been removed
+                // also check the definition belongs to one of autoexport 
modules
                 final AbstractDefinitionImpl childDefinition = 
childDefItem.getDefinition();
-                //and definition belongs to one of autoexport modules
-                if (!alreadyRemoved.contains(childDefinition) && 
isAutoExportModule(toExport.values(),
-                        childDefinition.getSource().getModule())) {
+                if (!alreadyRemoved.contains(childDefinition)
+                        && isAutoExportModule(toExport.values(), 
childDefinition.getSource().getModule())) {
                     // otherwise, remove it now
                     removeOneDefinitionItem(childDefItem, alreadyRemoved, 
toExport);
                 }
@@ -711,7 +711,6 @@ public class DefinitionMergeService {
         return autoExportModules.contains(candidate);
     }
 
-
     /**
      * Remove one definition item, either by removing it from its parent or 
(if root) removing the entire definition.
      * Recurs up the DefinitionItem tree to clean up newly-emptied items.



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/f3b1ce1f0107fc80cbb1436c3bf4ca9ba12e4ea0

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/f3b1ce1f0107fc80cbb1436c3bf4ca9ba12e4ea0
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to