Ate Douma pushed to branch bugfix/REPO-1537 at cms-community / hippo-repository


Commits:
d7b3b241 by Ate Douma at 2016-08-05T14:23:43+02:00
REPO-1537: only detect and mark downstream items for ContentResource 
InitializeItems

- - - - -


1 changed file:

- engine/src/main/java/org/onehippo/repository/bootstrap/InitializeItem.java


Changes:

=====================================
engine/src/main/java/org/onehippo/repository/bootstrap/InitializeItem.java
=====================================
--- a/engine/src/main/java/org/onehippo/repository/bootstrap/InitializeItem.java
+++ b/engine/src/main/java/org/onehippo/repository/bootstrap/InitializeItem.java
@@ -587,19 +587,25 @@ public class InitializeItem {
     }
 
     boolean isDownstreamItem(final InitializeItem upstreamItem) throws 
RepositoryException {
-        if (itemNode.isSame(upstreamItem.getItemNode())) {
-            return false;
-        }
-        if (upstreamItem.getSequence() > getSequence()) {
-            return false;
-        }
-        final String[] reloadPaths = upstreamItem.getContextPaths();
-        if (reloadPaths == null || reloadPaths.length == 0) {
-            return false;
-        }
-        for (InitializeInstruction instruction : getInstructions()) {
-            if (instruction.isDownstream(reloadPaths)) {
-                return true;
+        for (InitializeInstruction upstreamInstruction : 
upstreamItem.getInstructions()) {
+            // only need to detect and mark downstream items for 
ContentResource InitializeItems
+            if (upstreamInstruction instanceof ContentResourceInstruction) {
+                if (itemNode.isSame(upstreamItem.getItemNode())) {
+                    return false;
+                }
+                if (upstreamItem.getSequence() > getSequence()) {
+                    return false;
+                }
+                final String[] reloadPaths = upstreamItem.getContextPaths();
+                if (reloadPaths == null || reloadPaths.length == 0) {
+                    return false;
+                }
+                for (InitializeInstruction instruction : getInstructions()) {
+                    if (instruction.isDownstream(reloadPaths)) {
+                        return true;
+                    }
+                }
+                break;
             }
         }
         return false;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/d7b3b241b862f4fbba9df87ad2cfdd7f9eb59e43
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to