> Hi all
> 
> Had to fix ParentNode::readObject when deserializing-got a NullPointer
> Exception. This works, but it I am not certain of all it does.
> 
>     /** Deserialize object. */
>     private void readObject(ObjectInputStream ois)
>         throws ClassNotFoundException, IOException {
> 
>         // perform default deseralization
>         ois.defaultReadObject();
> 
>         // hardset synchildren - so we don't try to sync- it does not make
> any sense
>         // to try to synchildren when we just desealize object.
> 
>         needsSyncChildren(false);
> 
>                 if (fNodeListCache==null)
>                 {
>             // otherwise request a cache object
>             fNodeListCache = ownerDocument.getNodeListCache(this);
>                 }
>         // initialize transients
>         fNodeListCache.fLength = -1;
>         fNodeListCache.fChildIndex = -1;
> 
>     } // readObject(ObjectInputStream)


The right fix is actually to simply remove the last two lines.
fNodeListCache is set to a cache object later on if needed. I just
checked it in.
Thanks for your report!
-- 
Arnaud  Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to