Skip to content

Commit

Permalink
Propose changing the timing of removeAll() invocation from null to nu…
Browse files Browse the repository at this point in the history
…ll && length is greater than or equal to 0.
  • Loading branch information
dukbong committed Apr 16, 2024
1 parent f7465b0 commit 3e3e0e8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ private Object getRowValue(ResultSetWrapper rsw, ResultMap resultMap, String col
foundValues = applyAutomaticMappings(rsw, resultMap, metaObject, columnPrefix) || foundValues;
}
foundValues = applyPropertyMappings(rsw, resultMap, metaObject, lazyLoader, columnPrefix) || foundValues;
foundValues = lazyLoader.size() > 0 || foundValues;
foundValues = !lazyLoader.isEmpty() || foundValues;
rowValue = foundValues || configuration.isReturnInstanceForEmptyRow() ? rowValue : null;
}
return rowValue;
Expand Down Expand Up @@ -449,7 +449,7 @@ private Object getRowValue(ResultSetWrapper rsw, ResultMap resultMap, CacheKey c
foundValues = applyNestedResultMappings(rsw, resultMap, metaObject, columnPrefix, combinedKey, true)
|| foundValues;
ancestorObjects.remove(resultMapId);
foundValues = lazyLoader.size() > 0 || foundValues;
foundValues = !lazyLoader.isEmpty() || foundValues;
rowValue = foundValues || configuration.isReturnInstanceForEmptyRow() ? rowValue : null;
}
if (combinedKey != CacheKey.NULL_CACHE_KEY) {
Expand Down

0 comments on commit 3e3e0e8

Please sign in to comment.