mirror of https://github.com/apache/cloudstack.git
Fixed code review comments
This commit is contained in:
parent
8cabccdbae
commit
97b07dbaae
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue