fix(core): traversal contains Tree step has different result in v0.12 by vincentshu · Pull Request #1755 · apache/hugegraph

@vincentshu

…result comparing with [version 0.11.2]

fix #1745

@vincentshu

…result comparing with [version 0.11.2]

fix apache#1745

javeme

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! some minor comments~

*/
protected static boolean containsTree(Traversal.Admin<?, ?> traversal) {
boolean hasPath = TraversalHelper.getStepsOfClass(
TreeStep.class, traversal).size() > 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer to align with TraversalHelper

* @return the traversal or its parents contain at least one Tree step
*/
protected static boolean containsTree(Traversal.Admin<?, ?> traversal) {
boolean hasPath = TraversalHelper.getStepsOfClass(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename hasPath to hasTree?

@codecov

@imbajin imbajin changed the title Fix bug: [version 0.12.0] Traversal contains Tree step has different … fix(core): traversal contains Tree step has different result in v0.12

Feb 11, 2022

@vincentshu

…result comparing with [version 0.11.2]

javeme

imbajin

coderzc