Skip to content

Commit f2ac89a

Browse files
committed
HHH-15274 Field LazyAttributeLoadingInterceptor#lazyFields can never be null
1 parent 8e78a61 commit f2ac89a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/LazyAttributeLoadingInterceptor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ public boolean isAttributeLoaded(String fieldName) {
125125
}
126126

127127
private boolean isLazyAttribute(String fieldName) {
128-
return lazyFields == null || lazyFields.contains( fieldName );
128+
return lazyFields.contains( fieldName );
129129
}
130130

131131
private boolean isInitializedLazyField(String fieldName) {
132132
return initializedLazyFields != null && initializedLazyFields.contains( fieldName );
133133
}
134134

135135
public boolean hasAnyUninitializedAttributes() {
136-
if ( lazyFields == null || lazyFields.isEmpty() ) {
136+
if ( lazyFields.isEmpty() ) {
137137
return false;
138138
}
139139

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ public static Properties asProperties(Map<?,?> map) {
312312
* The returned Set might be immutable, but there is no guarantee of this:
313313
* consider it immutable but don't rely on this.
314314
* The goal is to save memory.
315+
* @return will never return null, but might return an immutable collection.
315316
*/
316317
public static <T> Set<T> toSmallSet(Set<T> set) {
317318
switch ( set.size() ) {

0 commit comments

Comments
 (0)