mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
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
|
|
@ -330,7 +330,7 @@ public class GuiDisplayUtil {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (textLines.lines.size() > 0) {
|
||||
if (!textLines.lines.isEmpty()) {
|
||||
for (String textLine : textLines.lines) {
|
||||
if (textLine != null && !textLine.replace(".", "").trim().isEmpty()) {
|
||||
rule.append("<p style='margin: 2px'>").append(textLine).append("</p>");
|
||||
|
|
@ -339,7 +339,7 @@ public class GuiDisplayUtil {
|
|||
}
|
||||
|
||||
String legal = rule.toString();
|
||||
if (legal.length() > 0) {
|
||||
if (!legal.isEmpty()) {
|
||||
legal = legal.replaceAll("\\{this\\}", card.getName().isEmpty() ? "this" : card.getName());
|
||||
legal = legal.replaceAll("\\{source\\}", card.getName().isEmpty() ? "this" : card.getName());
|
||||
buffer.append(ManaSymbols.replaceSymbolsWithHTML(legal, ManaSymbols.Type.TOOLTIP));
|
||||
|
|
@ -366,7 +366,7 @@ public class GuiDisplayUtil {
|
|||
for (CardType cardType : card.getCardTypes()) {
|
||||
types += cardType.toString() + ' ';
|
||||
}
|
||||
if (card.getSubTypes().size() > 0) {
|
||||
if (!card.getSubTypes().isEmpty()) {
|
||||
types += "- ";
|
||||
}
|
||||
for (String subType : card.getSubTypes()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue