Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Invalid
-
3.4.9
-
None
-
None
Description
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.