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=27992>. 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=27992 FIFO ordering in ActionMessages ------- Additional Comments From [EMAIL PROTECTED] 2004-03-26 23:27 ------- I don't mean to be negative about your code because I'm impressed you found the cause of the problem and came up with a solution without any help from the user or developer lists, but I had a look at your patch and have the following comments: Rather than adding a second "Comparator" and a new inner class would it not be better to just add "property" to the existing ActionMessageItem inner class. That way, the properties() method could just do a very similar process to the existing get() method? So what I'm suggesting is: 1) Add a "property" variable to the ActionMessageItem inner class along with setProperty() and getProperty methods and change the constructor to also take "property". 2) In the add(property, message) method change where the ActionMessageItem is instantiated to add the "property" to the constructor 3) Change the properties() method to sort the ActionMessageItems in a similar way to the get() method, but use the new getProperty() method in ActionMessageItem to build a List of property names. Something like: // do sort stuff first as per get() method // Create list of properties for (int i = 0; i < actionItems.size(); i++) { ActionMessageItem ami = (ActionMessageItem)actionItems.get(i); results.add(ami.getProperty()); } return results.iterator(); Niall --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]