3131import static org .apache .jackrabbit .oak .plugins .index .IndexConstants .TYPE_PROPERTY_NAME ;
3232import static org .apache .jackrabbit .oak .plugins .index .IndexUtils .getAsyncLaneName ;
3333import static org .apache .jackrabbit .oak .plugins .memory .EmptyNodeState .MISSING_NODE ;
34- import static org .apache .jackrabbit .oak .spi .commit .CompositeEditor .compose ;
35- import static org .apache .jackrabbit .oak .spi .commit .EditorDiff .process ;
36- import static org .apache .jackrabbit .oak .spi .commit .VisibleEditor .wrap ;
3734
3835import java .util .ArrayList ;
3936import java .util .HashMap ;
5754import org .apache .jackrabbit .oak .plugins .index .progress .TraversalRateEstimator ;
5855import org .apache .jackrabbit .oak .plugins .index .upgrade .IndexDisabler ;
5956import org .apache .jackrabbit .oak .spi .commit .CommitInfo ;
57+ import org .apache .jackrabbit .oak .spi .commit .CompositeEditor ;
6058import org .apache .jackrabbit .oak .spi .commit .Editor ;
59+ import org .apache .jackrabbit .oak .spi .commit .EditorDiff ;
60+ import org .apache .jackrabbit .oak .spi .commit .VisibleEditor ;
6161import org .apache .jackrabbit .oak .spi .state .NodeBuilder ;
6262import org .apache .jackrabbit .oak .spi .state .NodeState ;
6363import org .apache .jackrabbit .oak .spi .state .NodeStateUtils ;
@@ -134,7 +134,7 @@ public class IndexUpdate implements Editor, PathSource {
134134 /**
135135 * Editors for indexes that need to be re-indexed.
136136 */
137- private final Map <String , Editor > reindex = new HashMap <String , Editor >();
137+ private final Map <String , Editor > reindex = new HashMap <>();
138138
139139 public IndexUpdate (
140140 IndexEditorProvider provider , String async ,
@@ -182,8 +182,10 @@ public void enter(NodeState before, NodeState after)
182182 }
183183
184184 // no-op when reindex is empty
185- CommitFailedException exception = process (
186- wrap (wrapProgress (compose (reindex .values ()))), MISSING_NODE , after );
185+ CommitFailedException exception = EditorDiff .process (
186+ VisibleEditor .wrap (wrapProgress (CompositeEditor .compose (reindex .values ()))),
187+ MISSING_NODE ,
188+ after );
187189 rootState .progressReporter .reindexingTraversalEnd ();
188190 if (exception != null ) {
189191 throw exception ;
@@ -503,7 +505,7 @@ public Editor childNodeAdded(String name, NodeState after)
503505 children .add (child );
504506 }
505507 }
506- return compose (children );
508+ return CompositeEditor . compose (children );
507509 }
508510
509511 @ Override @ NotNull
@@ -518,7 +520,7 @@ public Editor childNodeChanged(
518520 children .add (child );
519521 }
520522 }
521- return compose (children );
523+ return CompositeEditor . compose (children );
522524 }
523525
524526 @ Override @ Nullable
@@ -531,7 +533,7 @@ public Editor childNodeDeleted(String name, NodeState before)
531533 children .add (child );
532534 }
533535 }
534- return compose (children );
536+ return CompositeEditor . compose (children );
535537 }
536538
537539 public void commitProgress (IndexProgress indexProgress ) {
0 commit comments