You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by bo...@apache.org on 2026/06/26 17:55:30 UTC
(grails-core) 02/02: Restore as Class[] casts in GrailsDataHibernate5TckManager dropped by merge
This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch 8.0.x-hibernate7.gorm-scaling-clean
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit b4dd42f312a3c633125572da617b3e69f67fa3cc
Author: Walter Duque de Estrada <wb...@mac.com>
AuthorDate: Fri Jun 26 12:50:17 2026 -0500
Restore as Class[] casts in GrailsDataHibernate5TckManager dropped by merge
The cosmetics cleanup commit (efc250a173) removed the 'as Class[]' coercions
from domainClasses when passing it to DefaultGrailsApplication and
HibernateDatastore constructors. Those constructors expect Class<?>[] but
getDomainClasses() returns Collections.unmodifiableList() (an
UnmodifiableRandomAccessList), so Groovy's MOP cannot find a matching
constructor at runtime, failing every TCK spec with:
GroovyRuntimeException: Could not find matching constructor for:
DefaultGrailsApplication(UnmodifiableRandomAccessList, GroovyClassLoader)
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
.../grails/data/hibernate5/core/GrailsDataHibernate5TckManager.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grails-data-hibernate5/core/src/test/groovy/org/apache/grails/data/hibernate5/core/GrailsDataHibernate5TckManager.groovy b/grails-data-hibernate5/core/src/test/groovy/org/apache/grails/data/hibernate5/core/GrailsDataHibernate5TckManager.groovy
index b6a730ae32..e4ce172698 100644
--- a/grails-data-hibernate5/core/src/test/groovy/org/apache/grails/data/hibernate5/core/GrailsDataHibernate5TckManager.groovy
+++ b/grails-data-hibernate5/core/src/test/groovy/org/apache/grails/data/hibernate5/core/GrailsDataHibernate5TckManager.groovy
@@ -73,10 +73,10 @@ class GrailsDataHibernate5TckManager extends GrailsDataTckManager {
boolean isTransactional = true
System.setProperty('hibernate5.gorm.suite', "true")
- grailsApplication = new DefaultGrailsApplication(domainClasses, new GroovyClassLoader(GrailsDataHibernate5TckManager.getClassLoader()))
+ grailsApplication = new DefaultGrailsApplication(domainClasses as Class[], new GroovyClassLoader(GrailsDataHibernate5TckManager.getClassLoader()))
grailsApplication.config.putAll(config)
- hibernateDatastore = new HibernateDatastore(DatastoreUtils.createPropertyResolver(config), domainClasses)
+ hibernateDatastore = new HibernateDatastore(DatastoreUtils.createPropertyResolver(config), domainClasses as Class[])
transactionManager = hibernateDatastore.getTransactionManager()
sessionFactory = hibernateDatastore.sessionFactory
if (transactionStatus == null && isTransactional) {