That's the explanation.
arkin
Jeffrey Rodriguez wrote:
>
> Mr. Garbuzov, you just found a bug.
>
> In XMLSerializer
>
> public void endElement( String namespaceURI, String localName,
> String rawName )
> {
> ElementState state;
>
> // Works much like content() with additions for closing
> // an element. Note the different checks for the closed
> // element's state and the parent element's state.
> unindent();
> state = getElementState();
> if ( state.empty ) {
>
> In this method getElementState() call may return a null
> so trying to access state.empty would cause a nullpointer exception
>
> To fix this bug we need to check if state is null first.
>
> Thanks,
> Jeffrey Rodriguez
> XML4J Support
> IBM Cupertino
>
> >From: Boris Garbuzov <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: Re: Review: Serializer API
> >Date: Tue, 21 Mar 2000 16:57:05 -0800
> >
> > String unexistingName = "unexistingName";
> > documentHandler.endElement (unexistingName);
> >
> >Even if I misuse the API (I should not call this directly?) it should have
> >failed friendlier than this:
> >
> >java.lang.NullPointerException:
> > at
> >org.apache.xml.serialize.XMLSerializer.endElement(XMLSerializer.java:307)
> > at
> >org.apache.xml.serialize.XMLSerializer.endElement(XMLSerializer.java:421)
> > at
> >com.keystrokenet.loanproduct.xml.test.Lab.executeTestBody(Lab.java:442)
> >
> >
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
--
----------------------------------------------------------------------
Assaf Arkin www.exoffice.com
CTO, Exoffice Technologies, Inc. www.exolab.org