On Jun 7, 2008, at 8:41 AM, Vincent Massol wrote:
>
> On Jun 7, 2008, at 8:39 AM, Vincent Massol wrote:
>
>> a unit test for this would be nice actually (I know I should have
>> written it initially, sorry about that).
>
> hehe, it arrived in the next batch of mails (I still don't get it
> why my mail client doesn't get all mails in one go and I have to pop
> several times to get them all).
>
> Thanks and sorry for the noise. I should have known better to guess
> that Sergiu would write a test! :)
That said it would have made more sense to commit the test along with
the change in the same commit set :)
-Vincent
>> On Jun 7, 2008, at 5:09 AM, sdumitriu (SVN) wrote:
>>
>>> Author: sdumitriu
>>> Date: 2008-06-07 05:09:36 +0200 (Sat, 07 Jun 2008)
>>> New Revision: 10143
>>>
>>> Modified:
>>> xwiki-platform/core/trunk/xwiki-observation/src/main/java/org/
>>> xwiki/observation/event/ActionExecutionEvent.java
>>> Log:
>>> XWIKI-2441: Comparing two ActionExecutionEvent always fails
>>> Fixed
>>>
>>>
>>> Modified: xwiki-platform/core/trunk/xwiki-observation/src/main/
>>> java/org/xwiki/observation/event/ActionExecutionEvent.java
>>> ===================================================================
>>> --- xwiki-platform/core/trunk/xwiki-observation/src/main/java/org/
>>> xwiki/observation/event/ActionExecutionEvent.java 2008-06-07
>>> 03:02:21 UTC (rev 10142)
>>> +++ xwiki-platform/core/trunk/xwiki-observation/src/main/java/org/
>>> xwiki/observation/event/ActionExecutionEvent.java 2008-06-07
>>> 03:09:36 UTC (rev 10143)
>>> @@ -71,6 +71,9 @@
>>> @Override
>>> public boolean equals(Object object)
>>> {
>>> + if (object instanceof ActionExecutionEvent) {
>>> + return getActionName().equals(((ActionExecutionEvent)
>>> object).getActionName());
>>> + }
>>> return getActionName().equals(object);
>>> }
>>>
>>> @@ -82,7 +85,7 @@
>>> public boolean matches(Object otherEvent)
>>> {
>>> boolean isMatching = false;
>>> - if
>>> (ActionExecutionEvent
>>> .class.isAssignableFrom(otherEvent.getClass())) {
>>> + if
>>> (this.getClass().isAssignableFrom(otherEvent.getClass())) {
>>> ActionExecutionEvent actionEvent =
>>> (ActionExecutionEvent) otherEvent;
>>> isMatching =
>>> getActionName().equals(actionEvent.getActionName());
>>> }
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs