You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Ted Wilmes (JIRA)" <ji...@apache.org> on 2017/07/13 16:40:00 UTC

[jira] [Created] (TINKERPOP-1727) Bytecode object shallow copied when traversals are cloned

Ted Wilmes created TINKERPOP-1727:
-------------------------------------

             Summary: Bytecode object shallow copied when traversals are cloned
                 Key: TINKERPOP-1727
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1727
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.2.5, 3.3.0
            Reporter: Ted Wilmes
            Assignee: Ted Wilmes


The {{bytecode}} member of traversal objects are only shallow copied when a traversal is cloned. This causes issues because any updates to the clone will be propagated to cloned traversal.

{code}
gremlin> g = TinkerGraph.open().traversal()
==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
gremlin> traversal = g.V().out();null
==>null
gremlin> clonedTraversal = traversal.asAdmin().clone();null
==>null
gremlin> clonedTraversal.out().out();null
==>null
gremlin> traversal.getBytecode()
==>[[], [V(), out(), out(), out()]]
gremlin> clonedTraversal.getBytecode()
==>[[], [V(), out(), out(), out()]]
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)