Skip to content

Commit b07101d

Browse files
committed
Fix merge with main
1 parent 75b9c72 commit b07101d

File tree

1 file changed

+0
-22
lines changed
  • x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree

1 file changed

+0
-22
lines changed

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree/Node.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import java.util.Iterator;
1515
import java.util.List;
1616
import java.util.Objects;
17-
import java.util.function.BiConsumer;
1817
import java.util.function.Consumer;
1918
import java.util.function.Function;
2019
import java.util.function.Predicate;
@@ -95,27 +94,6 @@ public <E extends T> void forEachUp(Class<E> typeToken, Consumer<? super E> acti
9594
});
9695
}
9796

98-
/**
99-
* Executes the action on every parent of the specified typeToken.
100-
*
101-
* @param typeToken the type of the node to search for
102-
* @param action the action to execute for each parent of the specified typeToken
103-
*/
104-
@SuppressWarnings("unchecked")
105-
public <E extends T> E forEachParent(Class<E> typeToken, BiConsumer<E, ? super T> action) {
106-
if (typeToken.isInstance(this)) {
107-
return (E) this;
108-
}
109-
for (Node<T> child : children()) {
110-
E foundMatchingChild = child.forEachParent(typeToken, action);
111-
if (foundMatchingChild != null) {
112-
action.accept(foundMatchingChild, (T) this);
113-
return foundMatchingChild;
114-
}
115-
}
116-
return null;
117-
}
118-
11997
public <E> void forEachPropertyOnly(Class<E> typeToken, Consumer<? super E> rule) {
12098
forEachProperty(typeToken, rule);
12199
}

0 commit comments

Comments
 (0)