Description
Variable ids maybe null in GraphStep.java, s simple sample list here:
gremlin> g.V().hasId([]).profile()
==>Traversal Metrics
Step Count Traversers Time (ms) % Dur
=============================================================================================================
TinkerGraphStep(vertex,null) 0.037 100.00
>TOTAL - - 0.037 -
So, GraphStep.java has many error when dealing with ids,just like:
@Override
public int hashCode() {
int result = super.hashCode() ^ this.returnClass.hashCode();
for (final Object id : this.ids) {
result ^= id.hashCode();
}
return result;
}
@Override
public String toString() {
if (this.hasContainers.isEmpty())
return super.toString();
else
return 0 == this.ids.length ?
StringFactory.stepString(this, this.returnClass.getSimpleName().toLowerCase(), this.hasContainers) :
StringFactory.stepString(this, this.returnClass.getSimpleName().toLowerCase(), Arrays.toString(this.ids), this.hasContainers);
}
I thinks this is bug not just appear from 3.4.2