Merge branch 'sonarqubefixes01' into 'master'

Fixes some SonarQube detected bugs

See merge request core-developers/forge!2019
This commit is contained in:
swordshine
2019-08-10 10:32:18 +00:00
17 changed files with 67 additions and 176 deletions

View File

@@ -370,7 +370,7 @@ public class GameFormat implements Comparable<GameFormat> {
rarities = Lists.newArrayList();
for (String s: Arrays.asList(strCars.split(", "))) {
cr = CardRarity.smartValueOf(s);
if (cr.name() != "Unknown") {
if (!cr.name().equals("Unknown")) {
rarities.add(cr);
}
}

View File

@@ -180,7 +180,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
sb.append(num).append(" of those ").append(type).append(" card(s)");
} else {
sb.append(destination.equals("Exile") ? " exiles " : " puts ");
if (type == "Card") {
if (type.equals("Card")) {
sb.append(num);
} else {
sb.append(num).append(" ").append(type);
@@ -208,7 +208,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
}
sb.append(" of ").append(fetchPlayer);
if (fetchPlayer != "their") {
if (!fetchPlayer.equals("their")) {
sb.append("'s");
}
sb.append(" library");