djtalez / android-binding

Automatically exported from code.google.com/p/android-binding
0 stars 0 forks source link

initiators.add(this) called twice in Observable.notifyChanged() ? #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, 
I was having a look at some code, and noticed the following. Not sure it is a 
problem, but I thought it could be worth sharing:

in Observable class, in void notifyChanged() method body, there's the following 
statement:

initiators.add(this);

After that, notifyChanged(initiators) gets called i.e. the overloaded method 
notifyChanged(AbstractCollection<Object>).
Within its body, the first line is again 

initiators.add(this); 

Is this useless? Or can it give problems? Should the first one of the two calls 
be removed?

Thanks for your time

Original issue reported on code.google.com by piscopo....@gmail.com on 28 May 2011 at 12:18

GoogleCodeExporter commented 8 years ago
I'll look at the source code once again. Anyway, this won't hurt anything to 
called twice (except that the little cpu time wasted in that). Thanks for your 
comment.

Original comment by gueei....@gmail.com on 1 Jun 2011 at 9:00

GoogleCodeExporter commented 8 years ago
Fixed, will include in upcoming release

Original comment by gueei....@gmail.com on 30 Jun 2011 at 2:34

GoogleCodeExporter commented 8 years ago
good!

Original comment by piscopo....@gmail.com on 30 Jun 2011 at 8:05