Looking at the ObserverWrapper it has three unused fields eventType, ifExist, and transObserverType. I had originally concluded that since ifExist wasn't used that the Conditional Observer Method logic wasn't implemented, but then I found it in BeanObserverImpl.

None of the runtime code ever assigns a value to these fields -- aside from the default -- and none of the runtime code uses those fields or related getters.

Should these be deleted or is there a reason for keeping them around?

Seems to me that ObserverWrapper is really just an internal detail of the NotificationManager and exists more or less as a way to pair the Observer with the Event Qualifiers. If you look at the java.util Collections classes, they'll typically use a private inner class for these "tuple" classes as they really have no meaning outside the class that uses it internally. I tend to do the same.

Any objections to me making that change as part of the transaction related observer fix?


-David

Reply via email to