forked from External/mage
list.size > 0 changed to !list.isEmpty
We care about if it's empty or not, not about it's size
This commit is contained in:
parent
f60ebfbb1f
commit
0557b5e89c
366 changed files with 532 additions and 548 deletions
|
|
@ -93,7 +93,7 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
|
|||
continue;
|
||||
}
|
||||
if (ability instanceof SpellAbility) {
|
||||
if (ability.getAdditionalCostsRuleVisible() && ability.getCosts().size() > 0) {
|
||||
if (ability.getAdditionalCostsRuleVisible() && !ability.getCosts().isEmpty()) {
|
||||
StringBuilder sbRule = threadLocalBuilder.get();
|
||||
for (Cost cost : ability.getCosts()) {
|
||||
if (cost.getText() != null && !cost.getText().isEmpty()) {
|
||||
|
|
@ -107,7 +107,7 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
|
|||
}
|
||||
String rule = ability.getRule();
|
||||
if (rule != null) {
|
||||
if (rule.length() > 0) {
|
||||
if (!rule.isEmpty()) {
|
||||
rules.add(Character.toUpperCase(rule.charAt(0)) + rule.substring(1));
|
||||
}
|
||||
} else { // logging so we can still can be made aware of rule problems a card has
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue