Many methods of XMLStreamBuffer throws XMLStreamBufferException, which
is a checked exception.
So what happens in the JAX-WS RI most of the time is that we simply wrap
that to XMLStreamException or SAXException, depending on the context.
Sometimes, even when "the context" is clear, like:
void XMLStreamBuffer.writeToXMLStreamWriter(XMLStreamWriter writer);
It still throws both XMLStreamException and XMLStreamBufferException.
This causes us to write a redundant try/catch block, which IMO makes the
code unnecessarily longer (and I think setting up try/catch block does
cost in terms of performance, too, although it's probably negligible.)
I wonder if we can go through XMLStreamBuffer and remove them as much as
possible.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com