Skip to content

Commit 9848c2f

Browse files
committed
imp: reduce useless LDAP deletion notice
1 parent eab464e commit 9848c2f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/org/ligoj/app/plugin/id/dao/IdCacheDaoImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,10 @@ public void removeUserFromGroup(final UserOrg user, final GroupOrg group) {
365365
}
366366

367367
private void deleteBatch(Class<?> cls, List<String> ids, Consumer<List<String>> batchConsumer) {
368-
log.info("Deleting removed cache {} {} entries", cls.getSimpleName(), ids.size());
369-
ListUtils.partition(ids, 1000).forEach(batchConsumer);
368+
if (!ids.isEmpty()) {
369+
log.info("Deleting removed cache {} {} entries", cls.getSimpleName(), ids.size());
370+
ListUtils.partition(ids, 1000).forEach(batchConsumer);
371+
}
370372
}
371373

372374
@Override

0 commit comments

Comments
 (0)