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

Reduce Traversal.isRoot() to a check of EmptyStep

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.0
    • Component/s: process
    • Labels:

      Description

      The Traversal.isRoot() default implementation looks like:

              public default boolean isRoot() {
                  return null == getParent() || getParent() instanceof EmptyStep;
              }
      

      Could this be reduced to just a check of EmptyStep - i.e. can the parent never be null

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                spmallette Stephen Mallette
                Reporter:
                spmallette Stephen Mallette
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: