You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2021/02/01 11:26:00 UTC

[jira] [Updated] (TINKERPOP-2515) Add clone method to GraphTraversal interface

     [ https://issues.apache.org/jira/browse/TINKERPOP-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Mallette updated TINKERPOP-2515:
----------------------------------------
    Component/s: process

> Add clone method to GraphTraversal interface
> --------------------------------------------
>
>                 Key: TINKERPOP-2515
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2515
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.4.9
>            Reporter: Christopher Smith
>            Priority: Major
>
> The canonical recommendation for reusing traversal parts (e.g., I have a method that takes a {{GraphTraversal}} as a parameter, and I need to apply {{.id()}} to it) is to call {{clone()}} on the traversal. However, the interface {{GraphTraversal}} does not actually provide a {{clone()}} method, and {{Object#clone()}} is protected. The universal actual implementations {{DefaultTraversal}} and {{DefaultGraphTraversal}} explicitly expose {{clone()}}, but they're hidden behind the interfaces.
> To provide Java/STC compatibility, {{GraphTraversal}} (and possibly {{Traversal}}) should expose the {{clone()}} methods.



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