Jean-Francois Leveque

Simplification

...@@ -56,7 +56,7 @@ public class AccountServiceDefault implements AccountService { ...@@ -56,7 +56,7 @@ public class AccountServiceDefault implements AccountService {
56 List<Integer> integers = new ArrayList<>(indexedAccounts.size()); 56 List<Integer> integers = new ArrayList<>(indexedAccounts.size());
57 indexedAccounts.forEach(indexedAccount -> integers.add(indexedAccount.getUserId())); 57 indexedAccounts.forEach(indexedAccount -> integers.add(indexedAccount.getUserId()));
58 58
59 - if (integers.size() > 0) { 59 + if (!integers.isEmpty()) {
60 return accountRepository.findByUserIdIn(integers); 60 return accountRepository.findByUserIdIn(integers);
61 } 61 }
62 62
......
...@@ -146,7 +146,7 @@ public class PublisherServiceDefault implements PublisherService { ...@@ -146,7 +146,7 @@ public class PublisherServiceDefault implements PublisherService {
146 List<Integer> integers = new ArrayList<>(indexedPublishers.size()); 146 List<Integer> integers = new ArrayList<>(indexedPublishers.size());
147 indexedPublishers.forEach(indexedPublisher -> integers.add(indexedPublisher.getPublisherId())); 147 indexedPublishers.forEach(indexedPublisher -> integers.add(indexedPublisher.getPublisherId()));
148 148
149 - if (integers.size() > 0) { 149 + if (!integers.isEmpty()) {
150 return publisherVersionRepository.findByPublisherVersionIdIn(integers); 150 return publisherVersionRepository.findByPublisherVersionIdIn(integers);
151 } 151 }
152 152
......