NodeStoreBranch branch = store.branch();
NodeState before = branch.getHead();
branch.setRoot(initializer.initialize(before));</BUG>
try {
<BUG>branch.merge(new EditorHook(new IndexUpdateProvider(indexEditor)), PostCommitHook.EMPTY);
</BUG>
} catch (CommitFailedException e) {
throw new RuntimeException(e);
}
}

public final class OakInitializer {
private OakInitializer() {
}
public static void initialize(@Nonnull NodeStore store,
@Nonnull RepositoryInitializer initializer,
@Nonnull IndexEditorProvider indexEditor) {
NodeBuilder builder = store.getRoot().builder();
initializer.initialize(builder);
try {
store.merge(builder, new EditorHook(new IndexUpdateProvider(indexEditor)), PostCommitHook.EMPTY);
} catch (CommitFailedException e) {
throw new RuntimeException(e);
}
}
