forked from External/mage
change some size() comparisons, to isEmpty()
This commit is contained in:
parent
5ba206111a
commit
eb0cfc94f8
23 changed files with 35 additions and 36 deletions
|
|
@ -145,7 +145,7 @@ public enum CopyPasteImageSource implements CardImageSource {
|
|||
final CopyPasteImageSourceDialog dialog = new CopyPasteImageSourceDialog();
|
||||
dialog.pack();
|
||||
int count = 0;
|
||||
if (viewMissingCards && missingCards.size() > 0 && singleLinks.size() == 0) {
|
||||
if (viewMissingCards && !missingCards.isEmpty() && singleLinks.isEmpty()) {
|
||||
viewMissingCards = false;
|
||||
String displayMissingCardsStr = "Up to the first 20 cards are:\n";
|
||||
String missingCardsStr = "";
|
||||
|
|
@ -228,7 +228,7 @@ public enum CopyPasteImageSource implements CardImageSource {
|
|||
public ArrayList<String> getSupportedSets() {
|
||||
setupLinks();
|
||||
ArrayList<String> supportedSetsCopy = new ArrayList<>();
|
||||
if (supportedSets.size() == 0) {
|
||||
if (supportedSets.isEmpty()) {
|
||||
for (String setCode : Sets.getInstance().keySet()) {
|
||||
supportedSets.add(setCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,16 +238,16 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
// 2. missing rarity icon:
|
||||
// WARNING, need too much time (60+ secs), only for debug mode
|
||||
///*
|
||||
if ((set.getCardsByRarity(Rarity.COMMON).size() > 0) && !res.haveCommon) {
|
||||
if (!set.getCardsByRarity(Rarity.COMMON).isEmpty() && !res.haveCommon) {
|
||||
logger.error(String.format("Symbols: set have common cards, but don't download icon: %s (%s)", set.getCode(), set.getName()));
|
||||
}
|
||||
if ((set.getCardsByRarity(Rarity.UNCOMMON).size() > 0) && !res.haveUncommon) {
|
||||
if (!set.getCardsByRarity(Rarity.UNCOMMON).isEmpty() && !res.haveUncommon) {
|
||||
logger.error(String.format("Symbols: set have uncommon cards, but don't download icon: %s (%s)", set.getCode(), set.getName()));
|
||||
}
|
||||
if ((set.getCardsByRarity(Rarity.RARE).size() > 0) && !res.haveRare) {
|
||||
if (!set.getCardsByRarity(Rarity.RARE).isEmpty() && !res.haveRare) {
|
||||
logger.error(String.format("Symbols: set have rare cards, but don't download icon: %s (%s)", set.getCode(), set.getName()));
|
||||
}
|
||||
if ((set.getCardsByRarity(Rarity.MYTHIC).size() > 0) && !res.haveMyth) {
|
||||
if (!set.getCardsByRarity(Rarity.MYTHIC).isEmpty() && !res.haveMyth) {
|
||||
logger.error(String.format("Symbols: set have mythic cards, but don't download icon: %s (%s)", set.getCode(), set.getName()));
|
||||
}
|
||||
//*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue