You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/04/25 23:14:35 UTC
[Bug 1519] New - TreeWalker enters infinite loop under certain input
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1519
*** shadow/1519 Wed Apr 25 14:14:34 2001
--- shadow/1519.tmp.6194 Wed Apr 25 14:14:35 2001
***************
*** 0 ****
--- 1,53 ----
+ +============================================================================+
+ | TreeWalker enters infinite loop under certain input |
+ +----------------------------------------------------------------------------+
+ | Bug #: 1519 Product: Xerces-J |
+ | Status: NEW Version: 1.3.1 |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: |
+ | Priority: Component: DOM |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: swing247@hotmail.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ run the following code, and treewalker will enter an infinite loop. out is
+ never printed. In real life you would never specify 0 for 'whatToShow', but if
+ you specify a filter and it happens to never return FILTER_ACCEPT on this
+ input, you have the same situation. I tried to debug it, but 3 hours later, I
+ decided I didn't have enough time. It seems like nextSibling in treeWalker may
+ return the nextSibling of a parent. I don't think this is correct behavior,
+ but most of the time it works anyway. Let me know if it's fixed, addressed, or
+ even not an issue in xerces2
+
+ String xml = ("<populate>"+
+ "<facility1><contactDetails1><organizationName>APL</organi
+ zationName><contactName>David Boyd</contactName><address><street1>1111
+ Broadway</street1><city>Oakland</city><stateOrProvince>CA</stateOrProvince><coun
+ try>USA</country><postalCode>94607-5500</postalCode></address><phone>510-272-
+ 8000</phone><fax>510-272-
+ 7421</fax><email>erep_americas@apl.com</email></contactDetails1></facility1>"+
+ "<facility2><contactDetails2><organizationName>APL</organi
+ zationName><contactName>David Boyd</contactName><address><street1>1111
+ Broadway</street1><city>Oakland</city><stateOrProvince>CA</stateOrProvince><coun
+ try>USA</country><postalCode>94607-5500</postalCode></address><phone>510-272-
+ 8000</phone><fax>510-272-
+ 7421</fax><email>erep_americas@apl.com</email></contactDetails2></facility2>"+
+ "<facility3><contactDetails3><organizationName>APL</organi
+ zationName><contactName>David Boyd</contactName><address><street1>1111
+ Broadway</street1><city>Oakland</city><stateOrProvince>CA</stateOrProvince><coun
+ try>USA</country><postalCode>94607-5500</postalCode></address><phone>510-272-
+ 8000</phone><fax>510-272-
+ 7421</fax><email>erep_americas@apl.com</email></contactDetails3></facility3>"+
+ "</populate>");
+
+ Element element = parse (xml);
+
+ System.out.println ("in");
+ TreeWalker walker = new org.apache.xerces.dom.TreeWalkerImpl (element,
+ 0, null, false);
+ walker.nextNode();
+ System.out.println ("out");
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org