You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by GitBox <gi...@apache.org> on 2022/03/22 13:01:07 UTC

[GitHub] [wicket] papegaaij commented on pull request #504: Guarantee order of listener notifications

papegaaij commented on pull request #504:
URL: https://github.com/apache/wicket/pull/504#issuecomment-1075149447


   I wouldn't recommend to depend on listeners being added in a specific order, especially when they are added automatically, for example via a service loader. However, if you add them yourself, you are in control and we can guarantee the order of execution. This change only indicates that the listeners are notified in the order they were added, which does make sense imho, also because the class already has a method to invoke them in reverse (the reverse of an unordered set doesn't exist). 
   
   This came up when a developer at our company wanted to change a specific listener rather than added his own, because this comment stated he could not rely on their order. He specifically wanted his code to be executed before another, both listeners are added manually.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org