HHH-15274 Field LazyAttributeLoadingInterceptor#lazyFields can never be null

This commit is contained in:
Sanne Grinovero 2022-05-14 17:07:21 +01:00 committed by Sanne Grinovero
parent 74d73a77b4
commit 88b5f49ac9
2 changed files with 3 additions and 3 deletions

View File

@ -124,7 +124,7 @@ public class LazyAttributeLoadingInterceptor extends AbstractLazyLoadInterceptor
}
private boolean isLazyAttribute(String fieldName) {
return lazyFields == null || lazyFields.contains( fieldName );
return lazyFields.contains( fieldName );
}
private boolean isInitializedLazyField(String fieldName) {
@ -132,7 +132,7 @@ public class LazyAttributeLoadingInterceptor extends AbstractLazyLoadInterceptor
}
public boolean hasAnyUninitializedAttributes() {
if ( lazyFields == null || lazyFields.isEmpty() ) {
if ( lazyFields.isEmpty() ) {
return false;
}

View File

@ -220,7 +220,7 @@ public final class CollectionHelper {
* The goal is to save memory.
* @param set
* @param <T>
* @return
* @return will never return null, but might return an immutable collection.
*/
public static <T> Set<T> toSmallSet(Set<T> set) {
switch ( set.size() ) {