You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2026/09/30 15:20:14 UTC
(grails-core) 10/11: Remove unnecessary cast in DefaultApplicationEventPublisher.dispatch
This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch test/document-datamapping-events
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 4c5fc58a0217c08f211690285c7e0f5ad9d66a24
Author: Walter Duque de Estrada <wb...@mac.com>
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 <no...@anthropic.com>
---
.../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())) {