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

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

Github user okram commented on the issue:

    https://github.com/apache/tinkerpop/pull/676
  
    Ah............ solid find. VOTE +1.


> 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.3.0, 3.2.5
>            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)

Reply via email to