[
https://issues.apache.org/jira/browse/TINKERPOP-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stephen mallette closed TINKERPOP-2283.
---------------------------------------
Resolution: Cannot Reproduce
On deeper review, I'm not seeing a problem here with {{GraphStep}} under the
conditions you've described:
{code}
gremlin> s = g.V().hasId([]).asAdmin().getStartStep();[]
gremlin> s.class
==>class org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep
gremlin> s.hashCode()
==>2085625529
gremlin> s.toString()
==>GraphStep(vertex,[])
{code}
You can get {{NullPointerException}} if you pass in a {{null}} explicitly but I
don't think the error will be related to {{GraphStep}} as this issue tries to
demonstrate. Perhaps we will get {{null}} handling better dealt with for
TINKERPOP-2235 - closing this one in favor of that.
> GraphStep's ids null exception
> ------------------------------
>
> Key: TINKERPOP-2283
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2283
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.4.2
> Reporter: Stark Arya
> Priority: Major
>
> Variable ids maybe null in GraphStep.java, s simple sample list here:
> _{color:#FF0000}gremlin> g.V().hasId([]).profile(){color}_
> _{color:#FF0000}==>Traversal Metrics{color}_
> _{color:#FF0000}Step Count Traversers Time (ms) % Dur{color}_
> _{color:#FF0000}============================================================================================================={color}_
> _{color:#FF0000}TinkerGraphStep(vertex,null) 0.037 100.00{color}_
> _{color:#FF0000}>TOTAL - - 0.037 -{color}_
> So, GraphStep.java has many error when dealing with ids,just like:
> {color:#FF0000}_@Override_{color}
> {color:#FF0000}_public int hashCode() {_{color}
> {color:#FF0000} _int result = super.hashCode() ^
> this.returnClass.hashCode();_{color}
> {color:#FF0000} _for (final Object id : this.ids) {_{color}
> {color:#FF0000} _result ^= id.hashCode();_{color}
> {color:#FF0000} _}_{color}
> {color:#FF0000} _return result;_{color}
> {color:#FF0000}_}_{color}
> {color:#d04437}_@Override_{color}
> {color:#d04437}_public String toString() {_{color}
> {color:#d04437} _if (this.hasContainers.isEmpty())_{color}
> {color:#d04437} _return super.toString();_{color}
> {color:#d04437} _else_{color}
> {color:#d04437} _return 0 == this.ids.length ?_{color}
> {color:#d04437} _StringFactory.stepString(this,
> this.returnClass.getSimpleName().toLowerCase(), this.hasContainers) :_{color}
> {color:#d04437} _StringFactory.stepString(this,
> this.returnClass.getSimpleName().toLowerCase(), Arrays.toString(this.ids),
> this.hasContainers);_{color}
> {color:#d04437}_}_{color}
> {color:#333333}I thinks this is bug not just appear from 3.4.2{color}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)