equals "" should be replaced with isEmpty

This commit is contained in:
vraskulin 2017-02-28 11:45:15 +03:00
parent 3600d03e2c
commit ad7d3c8078
6 changed files with 7 additions and 7 deletions

View file

@ -135,12 +135,12 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder();
if (!"".equals(duration.toString())) {
if (duration.toString() != null && !duration.toString().isEmpty()) {
sb.append(duration.toString()).append(", ");
}
sb.append("all ");
sb.append(filter.getMessage());
if ("".equals(duration.toString())) {
if (duration.toString() != null && duration.toString().isEmpty()) {
sb.append(" are ");
} else {
sb.append(" become ");

View file

@ -120,7 +120,7 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements
}
}
}
if ("".equals(type) || type == null && permanent.getCardType().contains(CardType.LAND)) {
if (type != null && type.isEmpty() || type == null && permanent.getCardType().contains(CardType.LAND)) {
permanent.getSubtype(game).retainAll(CardRepository.instance.getLandTypes());
}
if (!token.getSubtype(game).isEmpty()) {