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/27 14:48:24 UTC

(grails-core) 01/06: style: fix ternary operator placement in HibernateSession (Checkstyle)

This is an automated email from the ASF dual-hosted git repository.

borinquenkid pushed a commit to branch feat/gorm-registry-core
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit af616de85ac1b9ebe5b45944729b560962897f6d
Author: Walter Duque de Estrada <wb...@mac.com>
AuthorDate: Fri Jun 26 23:17:04 2026 -0500

    style: fix ternary operator placement in HibernateSession (Checkstyle)
    
    Move ? and : to end of previous line per Checkstyle's
    OperatorWrap rule (lines 426-428 in retrieveAll helper).
    
    Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
 .../src/main/groovy/org/grails/orm/hibernate/HibernateSession.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateSession.java b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateSession.java
index ee21695077..f56377aee0 100644
--- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateSession.java
+++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateSession.java
@@ -423,9 +423,9 @@ public class HibernateSession extends AbstractAttributeStoringSession implements
         // Build id → entity map, then reconstruct in input-key order with null slots for missing ids
         Map<Object, Object> byId = new HashMap<>();
         for (Object entity : fetched) {
-            Object id = persistentEntity.getIdentity() != null
-                ? getMappingContext().getEntityReflector(persistentEntity).getProperty(entity, idName)
-                : null;
+            Object id = persistentEntity.getIdentity() != null ?
+                getMappingContext().getEntityReflector(persistentEntity).getProperty(entity, idName) :
+                null;
             if (id != null) {
                 byId.put(id, entity);
             }