Github user spmallette commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/574#discussion_r106464069
  
    --- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Path.java
 ---
    @@ -238,10 +239,53 @@ public default boolean popEquals(final Pop pop, final 
Object other) {
                     isPresent();
         }
     
    +    /**
    +     * Isolate a sub-path from the path object. The isolation is based 
solely on the path labels.
    +     * The to-label is inclusive. Thus, from "b" to "c" would isolate the 
example path as follows {@code a,[b,c],d}.
    +     *
    +     * @param fromLabel The label to start recording the sub-path from.
    +     * @param toLabel   The label to end recording the sub-path to.
    +     * @return the isolated sub-path.
    +     */
    +    public default Path subPath(final String fromLabel, final String 
toLabel) {
    +        if (null == fromLabel && null == toLabel)
    +            return this;
    +        else {
    +            Path subPath = MutablePath.make();
    +            int size = this.size();
    --- End diff --
    
    Missed a `final` on `size` - that variable doesn't appear to be re-assigned 
elsewhere.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to