You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/01/30 19:38:06 UTC
DO NOT REPLY [Bug 38456] New: - Problem with infinate loop detection in FilterSet
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38456>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38456
Summary: Problem with infinate loop detection in FilterSet
Product: Ant
Version: 1.6.5
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: rmorgan@pobox.com
We use ant's FilterSet to perform token replacement on text to convert auto-generated HTML help to
SGML. We recently upgraded from ant 1.5.4 to ant 1.6.5, which appears to have broken the detection
of infinite loops in the token replacement.
Example code:
FilterSet filters = new FilterSet();
filters.setBeginToken("<");
filters.setEndToken(">");
filters.addFilter("ul", "<itemizedlist>");
filters.addFilter("/ul", "</itemizedList>");
filters.addFilter("li", "<listitem>");
filters.addFilter("/li", "</listitem>");
String html =
"<ul>" +
" <li>Item 1</li>" +
" <li>Item 2</li>" +
"</ul>";
String sgml = filters.replaceTokens(html);
This code results in an error saying that there is an infinite loop in the replacement of tokens. Note
though, that none of the replaced properties reference a token that would cause an infinite loop.
Output with ant 1.6.5:
Infinite loop in tokens. Currently known tokens : [ul, li, /li]
Problem token : <li> called from </li>
HTML: <ul> <li>Item 1</li> <li>Item 2</li></ul>
SGML: <itemizedlist> <listitem>Item 1</listitem> liItem 2/li/ul
Output with ant 1.5.4:
HTML: <ul> <li>Item 1</li> <li>Item 2</li></ul>
SGML: <itemizedlist> <listitem>Item 1</listitem> <listitem>Item 2</listitem></itemizedList>
I'll attach my test case.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 38456] - Problem with infinate loop detection in FilterSet
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38456>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38456
------- Additional Comments From rmorgan@pobox.com 2006-01-30 19:40 -------
Created an attachment (id=17540)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17540&action=view)
Test case
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 38456] - Problem with infinate loop detection in FilterSet
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38456>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38456
------- Additional Comments From jkf@apache.org 2006-02-03 00:18 -------
The workaround is to set the recurse option to false
(add filters.setRecurse(false);)
The recurse option is protected against looping by only performing a replace of
a token on any single line only once. This is incorrect.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 38456] - Problem with infinate loop detection in FilterSet
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38456>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38456
jkf@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.7
------- Additional Comments From jkf@apache.org 2006-02-03 00:49 -------
Fixed on head
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org