[cp-patches] RFC: fix for PR27864

Robert Schuster theBohemian at gmx.net
Wed Jun 7 13:37:47 UTC 2006


Hi,
unfortunately the fix you proposed yesterday on IRC did not work. I have further
investigate the problem to find out about your consideration about an NPE
happening because of my patch: I found out that if root is null, the code will
not reach that code location because then 'here' would be null too and this is
handled in line 243.

cya
Robert

Robert Schuster wrote:
> Hi,
> this patch fixes PR27864 for me.
> 
> Ok to commit?
> 
> ChangeLog:
> 
> 2006-06-01  Robert Schuster  <robertschuster at fsfe.org>
> 
>         Fixes PR27864.
>         * gnu/xml/dom/DomIterator.java:
>         (successor): Changed expression.
> 
> cya
> Robert
> 
> 
> ------------------------------------------------------------------------
> 
> Index: gnu/xml/dom/DomIterator.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomIterator.java,v
> retrieving revision 1.4
> diff -u -r1.4 DomIterator.java
> --- gnu/xml/dom/DomIterator.java	2 Jul 2005 20:32:15 -0000	1.4
> +++ gnu/xml/dom/DomIterator.java	1 Jun 2006 17:13:03 -0000
> @@ -297,7 +297,10 @@
>        {
>          next = next.getParentNode();
>        }
> -    if (next == root)
> +    
> +    /* If we have exceeded the root node then stop traversing.
> +     */
> +    if (next == root.getParentNode())
>        {
>          return null;
>        }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060607/a8e1db11/signature.pgp


More information about the Classpath-patches mailing list