This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch test/document-datamapping-events
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to
refs/heads/test/document-datamapping-events by this push:
new dcdb6144f7 Remove unnecessary cast in
DefaultApplicationEventPublisher.dispatch
dcdb6144f7 is described below
commit dcdb6144f7c6671bb427589022ab868a8254ef34
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Sun Aug 16 10:34:56 2026 -0500
Remove unnecessary cast in DefaultApplicationEventPublisher.dispatch
event.getClass() already statically types as Class<? extends
ApplicationEvent> here, matching supportsEventType's parameter type,
so the explicit cast was redundant.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
---
.../datastore/gorm/events/DefaultApplicationEventPublisher.groovy | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/events/DefaultApplicationEventPublisher.groovy
b/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/events/DefaultApplicationEventPublisher.groovy
index 43fa9303b5..b1d534a60a 100644
---
a/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/events/DefaultApplicationEventPublisher.groovy
+++
b/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/events/DefaultApplicationEventPublisher.groovy
@@ -51,7 +51,7 @@ class DefaultApplicationEventPublisher implements
ConfigurableApplicationEventPu
for (listener in applicationListeners) {
if (listener instanceof SmartApplicationListener) {
SmartApplicationListener smartApplicationListener =
(SmartApplicationListener) listener
- if
(!smartApplicationListener.supportsEventType((Class<ApplicationEvent>)
event.getClass())) {
+ if
(!smartApplicationListener.supportsEventType(event.getClass())) {
continue
}
else if
(!smartApplicationListener.supportsSourceType(event.source.getClass())) {