introduced StringUtil class with .isEmpty(String input) and .isNotEmpty(String input), to replace str != null && str.length()>0 statements

This commit is contained in:
ingmargoudt 2016-09-16 20:51:51 +02:00
parent fb15c79964
commit f1cf9e7adb
47 changed files with 132 additions and 96 deletions

View file

@ -87,7 +87,7 @@ public class LoseLifeOpponentsEffect extends OneShotEffect {
sb.append(amount).append(" ");
}
sb.append("life");
if (message.length() > 0) {
if (!message.isEmpty()) {
sb.append(message.equals("1") || message.startsWith("the ") ? " equal to the number of " : " for each ");
sb.append(message);
}