Laurent Klock (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5b8d279...
) *commented* on HHH-16977 (
https://hibernate.atlassian.net/browse/HHH-16977?atlOrigin=eyJpIjoiOTNmNW...
)
Re: NullPointerException in EntityEntryContext.downgradeLocks (
https://hibernate.atlassian.net/browse/HHH-16977?atlOrigin=eyJpIjoiOTNmNW...
)
Hi @Andre Boriero,
Unfortunately, I did not manage to reproduce it out of our system (which involves
different applications and databases, would be not so easy to reproduce)
I intend to submit the following fix to branch 5.6x (and to main branch as well). What do
you think ?
From f9fd2e35894df6149885696704c7078d2d251e28 Mon Sep 17 00:00:00 2001
From: Laurent Klock <Laurent.Klock(a)arhs-cube.com>
Date: Mon, 24 Jul 2023 11:20:25 +0200
Subject: [PATCH] HHH-16977: Fixed in NullPointerException in
EntityEntryContext.downgradeLocks
---
.../org/hibernate/engine/internal/EntityEntryContext.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/hibernate-core/src/main/java/org/hibernate/engine/internal/EntityEntryContext.java
b/hibernate-core/src/main/java/org/hibernate/engine/internal/EntityEntryContext.java
index a532a17927..6ca1237926 100644
--- a/hibernate-core/src/main/java/org/hibernate/engine/internal/EntityEntryContext.java
+++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/EntityEntryContext.java
@@ -370,7 +370,10 @@ public class EntityEntryContext {
ManagedEntity node = head;
while ( node != null ) {
- node.$$_hibernate_getEntityEntry().setLockMode( LockMode.NONE );
+ EntityEntry entityEntry = node.$$_hibernate_getEntityEntry();
+ if (entityEntry != null) {
+ entityEntry.setLockMode( LockMode.NONE );
+ }
node = node.$$_hibernate_getNextManagedEntity();
}
--
2.21.0.windows.1
(
https://hibernate.atlassian.net/browse/HHH-16977#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16977#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100232- sha1:a133497 )