uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Holmberg <holmberg2...@comcast.net>
Subject Bug in XmiCasSerializer?
Date Tue, 30 Mar 2010 01:39:17 GMT
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 throw
an NPE. 

The developer at AgileDelta claims that the SAX spec says these should not be null (only if
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.


Greg Holmberg 

View raw message