mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
change looping over maps (Sonar)
This commit is contained in:
parent
63718e7a6e
commit
dc112215d4
11 changed files with 24 additions and 22 deletions
|
|
@ -53,7 +53,7 @@ public class TapAllTargetPlayerControlsEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
return "tap all " + filter.toString() + " target " +
|
||||
(mode.getTargets().size() == 0 ? "player" : mode.getTargets().get(0).getTargetName()) +
|
||||
(mode.getTargets().isEmpty() ? "player" : mode.getTargets().get(0).getTargetName()) +
|
||||
" controls";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public enum CardRepository {
|
|||
try {
|
||||
cardDao.callBatchTasks(() -> {
|
||||
// add
|
||||
if (newCards != null && newCards.size() > 0) {
|
||||
if (newCards != null && !newCards.isEmpty()) {
|
||||
logger.info("DB: need to add " + newCards.size() + " new cards");
|
||||
try {
|
||||
for (CardInfo card : newCards) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public enum ExpansionRepository {
|
|||
try {
|
||||
expansionDao.callBatchTasks(() -> {
|
||||
// add
|
||||
if (newSets != null && newSets.size() > 0) {
|
||||
if (newSets != null && !newSets.isEmpty()) {
|
||||
logger.info("DB: need to add " + newSets.size() + " new sets");
|
||||
try {
|
||||
for (ExpansionInfo exp : newSets) {
|
||||
|
|
@ -82,7 +82,7 @@ public enum ExpansionRepository {
|
|||
}
|
||||
|
||||
// update
|
||||
if (updatedSets != null && updatedSets.size() > 0) {
|
||||
if (updatedSets != null && !updatedSets.isEmpty()) {
|
||||
logger.info("DB: need to update " + updatedSets.size() + " sets");
|
||||
try {
|
||||
for (ExpansionInfo exp : updatedSets) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue