Hi Sanne,

I have a few comments, since I was the last one working on the code. I hope you might find this helpful. First of all, EventListenerRegister has its origin in the Annotations project and just recently got moved from Annotations to Search (where it actually belongs). I applied some refactorings, but the biggest outstanding refactoring would be to generalise the registration of the listeners. I tried one apporach, but the code became very hard to read. So I decided to leave this part as is for now.

Initially I wanted to get rid of the old registration code completely and if you check the history of the class you will see that I did not have 'searchEventListenerClass == eventListener.getClass().getSuperclass();' at all. It worked fine for the latest versions of Annotations and Search. However, I think there were problems when using different combinations of Annotations and Search. For that reason Emmanuel added this additional check. It evades me right now what the actual reason was.

Regarding "isAssignableFrom" - you might be right. Let me have another look at the code and come back to you.

--Hardy
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to