You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PathContext instances are built as [ROOT; CURRENT_PATH] and [ROOT; NEXT_PATH] as the paths actually have no knowledge of the previous paths, even though the elements() method is called. The elements() only contains the ROOT and the path itself.
I've fixed this by mirroring some classes from Flow
public final void executeTraversal(PathContainerView view, Flow.Traversal traversal, final Flow.TraversalCallback callback) {
final View oldChild = view.getCurrentChild();
Path path = traversal.destination.top();
int i;
if(traversal.direction == Flow.Direction.FORWARD) {
Iterator<Object> _destinationPaths = traversal.destination.reverseIterator();
i = 1; // 0 is ROOT in PathContext! DO NOT CHANGE TO 0
while(_destinationPaths.hasNext()) {
Path destinationPath = (Path) _destinationPaths.next();
if(destinationPath != path) {
path.elements().add(i, destinationPath);
}
i++;
}
}
//...
and
/**
* Finds the tail of this path which is not in the given path, and destroys it.
*/
public void destroyNotIn(PathContext path, PathContextFactory factory) {
Iterator<Path> aElements = this.path.elements().iterator();
Iterator<Path> bElements = path.path.elements().iterator();
while(aElements.hasNext() && bElements.hasNext()) {
Path aElement = aElements.next();
Path bElement = bElements.next();
if(!aElement.equals(bElement)) {
factory.tearDownContext(contexts.get(aElement));
break;
}
}
while(aElements.hasNext()) {
Path aElement = aElements.next();
factory.tearDownContext(contexts.get(aElement));
}
}
I should probably make a pull request about this, but I'm using 0.12 and I'm not sure if anything has changed since then.
The text was updated successfully, but these errors were encountered:
The PathContext instances are built as [ROOT; CURRENT_PATH] and [ROOT; NEXT_PATH] as the paths actually have no knowledge of the previous paths, even though the
elements()
method is called. Theelements()
only contains the ROOT and the path itself.I've fixed this by mirroring some classes from Flow
and
I should probably make a pull request about this, but I'm using 0.12 and I'm not sure if anything has changed since then.
The text was updated successfully, but these errors were encountered: