Yes, the exception is expected here. The problem is we can't detect this problem properly (there is no way to check <T> from the callback is assignable to ObserverMethod.getObservedType()). However, we can log a warning if a user sets an incompatible observed type during ProcessObserverMethod notification (i.e. event.configureObserverMethod().observedType(Apple.class) in your example, where Apple is not assignable from Pear). |