Github user dkuppitz commented on the issue:

    https://github.com/apache/tinkerpop/pull/355
  
    I noticed a flaw while reading through the code. It was not introduced by 
this PR, but it's probably a good time to get it from the table.
    
    ```
    gremlin> g = TinkerFactory.createModern().traversal()
    ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
    gremlin> g.V().hasId(within(new ArrayList()))
    0
    Display stack trace? [yN] N
    gremlin> g.V().hasId(without(new ArrayList()))
    0
    Display stack trace? [yN]
    ```
    
    A `HasContainer` with an empty collection will always throw an exception 
because of [line 58 in 
HasContainer.java](https://github.com/BrynCooke/incubator-tinkerpop/blob/ca8a4f9fb8a9bc1d69aa10870d75076b8fa906b5/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java#L58),
 where we simply assume that a collection will always contain at least one 
element.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to