Skip to content

Commit 78119a4

Browse files
committed
HHH-19582 - Fix NPE
Signed-off-by: Jan Schatteman <[email protected]>
1 parent d61dbe0 commit 78119a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hibernate-core/src/main/java/org/hibernate/internal/util/collections/AbstractPagedArray.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ protected Page<E> getOrCreateEntryPage(int index) {
176176

177177
public void clear() {
178178
for ( Page<E> entryPage : elementPages ) {
179-
entryPage.clear();
179+
if ( entryPage != null ) {
180+
entryPage.clear();
181+
}
180182
}
181183
elementPages.clear();
182184
elementPages.trimToSize();

0 commit comments

Comments
 (0)