Fixed code review comments

This commit is contained in:
mprokopchuk 2024-09-09 15:54:44 -07:00
parent 8cabccdbae
commit 97b07dbaae
2 changed files with 5 additions and 1 deletions

View File

@ -746,7 +746,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
* and next millisecond new event added and finally we ended up with count = 1 and no ids.
*/
if (count == 0 || idArray.length < 1) {
return new Pair<>(new ArrayList<>(), count);
count = 0;
}
List<EventJoinVO> events = _eventJoinDao.searchByIds(idArray);

View File

@ -130,6 +130,10 @@ public class EventJoinDaoImpl extends GenericDaoBase<EventJoinVO, Long> implemen
@Override
public List<EventJoinVO> searchByIds(Long... ids) {
// return empty collection if there are no ids.
if (ids.length == 0) {
return List.of();
}
SearchCriteria<EventJoinVO> sc = vrSearch.create();
sc.setParameters("idIN", ids);
return searchIncludingRemoved(sc, null, null, false);