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=28486>. 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=28486 [digester] ExtendedBaseRules test fails ------- Additional Comments From [EMAIL PROTECTED] 2004-04-28 22:50 ------- It's going to be a tricky one to duplicate with a unit test (which is why I didn't create one :-). I can definitely say that exactly the same code passes with jdk1.4 and fails with jdk1.2 (returns different sets of matches). I can't see any other reasonable cause except the order rules are returned by map.entrySet(). I'm not sure what you mean by "actually an ordering problem rather than simply a code problem". I think it's both: a bug in the code causes two rules which should have different "priorities" to actually have the same "priority". And in the case of a tie, the first rule found wins. So if the correct rule is encountered first, the test works and if the wrong rule is encountered first, the test fails. And which is encountered first depends upon the internal implementation of the HashMap class (or the String hashcode method), which is jdk-specific. A unit test for this would presumably involve subclassing the ExtendedBaseRules class and using a custom map class, such as one of the OrderedMap classes from collections. By then adding the rules to the digester in different orders, the order they are returned from the map.entrySet could be controlled. That all sounds like a lot of work, unfortunately! I might have a go at this over the weekend if the rain continues....unless you beat me to it ;-) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
