Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2283

GraphStep's ids null exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.2
    • 3.3.9, 3.4.4, 3.5.0
    • process
    • None

    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

      Attachments

        Activity

          People

            spmallette Stephen Mallette
            Stark Arya Stark Arya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: