[ 
https://issues.apache.org/jira/browse/TINKERPOP-2310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969202#comment-16969202
 ] 

ASF GitHub Bot commented on TINKERPOP-2310:
-------------------------------------------

spmallette commented on pull request #1216: TINKERPOP-2310 and TINKERPOP-2311 
Folllow up refactoring after TraversalStrategy changes
URL: https://github.com/apache/tinkerpop/pull/1216
 
 
   https://issues.apache.org/jira/browse/TINKERPOP-2310
   https://issues.apache.org/jira/browse/TINKERPOP-2311
   
   A few added refactoring opportunities were noticed as a result of 
TINKERPOP-1568. Basically, `TraversalStrategies` now implements `Iterable` and 
the semantics of `Traversal.isRoot()` have been narrowed to only check for 
`EmptyStep` rather than also checking for `null`.
   
   All tests pass with `docker/build.sh -t -n -i`
   
   VOTE +1
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Reduce Traversal.isRoot() to a check of EmptyStep
> -------------------------------------------------
>
>                 Key: TINKERPOP-2310
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2310
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.5.0
>            Reporter: Stephen Mallette
>            Assignee: Stephen Mallette
>            Priority: Minor
>              Labels: breaking
>
> The {{Traversal.isRoot()}} default implementation looks like:
> {code}
>         public default boolean isRoot() {
>             return null == getParent() || getParent() instanceof EmptyStep;
>         }
> {code}
> Could this be reduced to just a check of {{EmptyStep}} - i.e. can the parent 
> never be {{null}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to