Skip to content

H7: Replace fully-qualified class names with imports and use var in HibernateCriteriaBuilder and CollectionBinder #15764

Description

@borinquenkid

Summary

Two classes in grails-data-hibernate7 were ported from H5 code and carry style issues that were intentionally deferred from PR #15568 to keep the review surface focused on the H7 integration work.

Files

  • grails-data-hibernate7/core/src/main/groovy/grails/orm/HibernateCriteriaBuilder.java

    • Many fully-qualified class names used inline (e.g. org.hibernate.Session, grails.gorm.DetachedCriteria) instead of imports
    • Local variable types that could use var
  • grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/CollectionBinder.java

    • Local variable declarations that could use var (e.g. line 95)

Work

  1. Replace inline FQCNs with import statements in HibernateCriteriaBuilder.java
  2. Replace eligible local variable declarations with var in both files
  3. Run ./gradlew :grails-data-hibernate7-core:test to verify no regressions

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions