Richard Eckart de Castilho created UIMA-6388:
------------------------------------------------

             Summary: CAS.select(null) returns all annotations
                 Key: UIMA-6388
                 URL: https://issues.apache.org/jira/browse/UIMA-6388
             Project: UIMA
          Issue Type: Bug
          Components: Core Java Framework
    Affects Versions: 3.2.0SDK
            Reporter: Richard Eckart de Castilho
            Assignee: Richard Eckart de Castilho
             Fix For: 3.2.1SDK


When calling {{CAS.select()}} with a {{Type null}} argument, then all 
annotations are returned. I believe when select is called with a {{null}} 
argument, an {{IllegalArgumentException}} should be thrown instead. It is very 
surprising if you write code like this:

{code}
var type = cas.getTypeSystem("non.existing.Type");
cas.select(type).asList() <= returns a list of all feature structures in the 
CAS, e.g. the DocumentAnnotation etc.
{code}



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

Reply via email to