Browse Source
The Spring container does not check nested generic types of the type parameter of ApplicationEvent<T>. As T is parameterized in our case as well (PersistentEntity<…, …>) we can code an event listener against that fully parameterized type but might run into ClassCastExceptions as we might get other implementations handed into the method at runtime. We now do an instanceof check to safely invoke checkForIndexes(…) only in case we get the correct event type.pull/1/head
1 changed files with 8 additions and 1 deletions
Loading…
Reference in new issue