uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: Bug in XmiCasSerializer?
Date Tue, 30 Mar 2010 11:40:17 GMT
I found another line in that class where these arguments (which are for
the namespace) are passed in as "", "".  So I think it is a bug.  Also
the javadoc for the impl has this for the first 2 parameters of this method:

    *uri* The Namespace URI, or the empty string if none is available or
    Namespace processing is not being performed. 
    *localName* The local name, or the empty string if Namespace
    processing is not being performed.

So I think it's a bug.


On 3/29/2010 9:39 PM, Greg Holmberg wrote:
> UIMA developers-- 
> XmiCasSerializer.XmiCasDocSerializer has this method: 
>     private void addAttribute(AttributesImpl attrs, String attrName, String attrValue)
>         attrs.addAttribute(null, null, attrName, cdataType, attrValue); 
>     } 
> When I plug in a different ContentHandler (such as the ones from AgileDelta or Siemens

> for generating binary XML, aka EXI), then I get NullPointerExceptions. Apparently, they

> aren't expecting null for an attribute's URI and/or localName. 
> I changed the above line to use "" instead of null, and these ContentHandlers no longer
> an NPE. 
> The developer at AgileDelta claims that the SAX spec says these should not be null (only
if the
> index is out of range).
> So what is your opinion? Is null incorrect? Would there be any consequences (performance,
> perhaps?) to changing the arguments to "" ?
> If you think it's a bug, I'll create an issue in Jira.
> Thanks, 
> Greg Holmberg 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message