From 3653e09ce43541321d8190f78462fcc26ea79b4d Mon Sep 17 00:00:00 2001 From: Ingmar Goudt Date: Fri, 28 Sep 2018 15:18:54 +0200 Subject: [PATCH] make some fields final --- .../mage/abilities/effects/common/ChooseACardNameEffect.java | 2 +- .../abilities/effects/common/ChooseBasicLandTypeEffect.java | 2 +- .../mage/abilities/effects/common/ChooseOpponentEffect.java | 2 +- .../java/mage/abilities/effects/keyword/FatesealEffect.java | 2 +- Mage/src/main/java/mage/abilities/keyword/AscendAbility.java | 2 +- Mage/src/main/java/mage/cards/decks/Constructed.java | 4 ++-- .../main/java/mage/cards/decks/importer/DeckImporterUtil.java | 2 +- .../main/java/mage/cards/decks/importer/TxtDeckImporter.java | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/ChooseACardNameEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseACardNameEffect.java index e8fc6ab108..86edae8d1f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ChooseACardNameEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChooseACardNameEffect.java @@ -18,7 +18,7 @@ import mage.util.CardUtil; */ public class ChooseACardNameEffect extends OneShotEffect { - public static String INFO_KEY = "NAMED_CARD"; + public static final String INFO_KEY = "NAMED_CARD"; public enum TypeOfName { diff --git a/Mage/src/main/java/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java index ee84454831..739aaaeca4 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChooseBasicLandTypeEffect.java @@ -22,7 +22,7 @@ import mage.util.CardUtil; */ public class ChooseBasicLandTypeEffect extends OneShotEffect { - public static String VALUE_KEY = "BasicLandType"; + public static final String VALUE_KEY = "BasicLandType"; public ChooseBasicLandTypeEffect(Outcome outcome) { super(outcome); diff --git a/Mage/src/main/java/mage/abilities/effects/common/ChooseOpponentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseOpponentEffect.java index 8b7662df2b..8c841e907f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ChooseOpponentEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChooseOpponentEffect.java @@ -21,7 +21,7 @@ import mage.util.CardUtil; */ public class ChooseOpponentEffect extends OneShotEffect { - public static String VALUE_KEY = "_opponent"; + public static final String VALUE_KEY = "_opponent"; public ChooseOpponentEffect(Outcome outcome) { super(outcome); diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/FatesealEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/FatesealEffect.java index cf36084701..264c11484e 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/FatesealEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/FatesealEffect.java @@ -24,7 +24,7 @@ import mage.util.CardUtil; public class FatesealEffect extends OneShotEffect { - protected static FilterCard filter1 = new FilterCard("card to put on the bottom of opponent's library"); + protected static final FilterCard filter1 = new FilterCard("card to put on the bottom of opponent's library"); protected int fatesealNumber; diff --git a/Mage/src/main/java/mage/abilities/keyword/AscendAbility.java b/Mage/src/main/java/mage/abilities/keyword/AscendAbility.java index 3a0334470f..2292030e09 100644 --- a/Mage/src/main/java/mage/abilities/keyword/AscendAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/AscendAbility.java @@ -22,7 +22,7 @@ import mage.players.Player; */ public class AscendAbility extends SimpleStaticAbility { - public static String ASCEND_RULE = "Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)"; + public static final String ASCEND_RULE = "Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)"; public AscendAbility() { super(Zone.BATTLEFIELD, new AscendContinuousEffect()); diff --git a/Mage/src/main/java/mage/cards/decks/Constructed.java b/Mage/src/main/java/mage/cards/decks/Constructed.java index ba74447185..23410c32b5 100644 --- a/Mage/src/main/java/mage/cards/decks/Constructed.java +++ b/Mage/src/main/java/mage/cards/decks/Constructed.java @@ -17,8 +17,8 @@ public class Constructed extends DeckValidator { private static final Logger logger = Logger.getLogger(DeckValidator.class); - protected static List anyNumberCardsAllowed = new ArrayList<>(Arrays.asList("Relentless Rats", "Shadowborn Apostle", "Rat Colony")); - protected static List basicLandNames = new ArrayList<>( + protected static final List anyNumberCardsAllowed = new ArrayList<>(Arrays.asList("Relentless Rats", "Shadowborn Apostle", "Rat Colony")); + protected static final List basicLandNames = new ArrayList<>( Arrays.asList("Forest", "Island", "Mountain", "Swamp", "Plains", "Wastes", "Snow-Covered Forest", "Snow-Covered Island", "Snow-Covered Mountain", "Snow-Covered Swamp", "Snow-Covered Plains")); protected List banned = new ArrayList<>(); diff --git a/Mage/src/main/java/mage/cards/decks/importer/DeckImporterUtil.java b/Mage/src/main/java/mage/cards/decks/importer/DeckImporterUtil.java index 2912dafd7e..a0e90dc526 100644 --- a/Mage/src/main/java/mage/cards/decks/importer/DeckImporterUtil.java +++ b/Mage/src/main/java/mage/cards/decks/importer/DeckImporterUtil.java @@ -12,7 +12,7 @@ import mage.cards.decks.DeckCardLists; */ public final class DeckImporterUtil { - public static final String[] SIDEBOARD_MARKS = new String[]{"//sideboard", "sb: "}; + private static final String[] SIDEBOARD_MARKS = new String[]{"//sideboard", "sb: "}; public static boolean haveSideboardSection(String file) { // search for sideboard section: diff --git a/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java index 14d2b31f57..4d593610ff 100644 --- a/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java +++ b/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java @@ -16,9 +16,9 @@ import mage.cards.repository.CardRepository; */ public class TxtDeckImporter extends DeckImporter { - public static final String[] SET_VALUES = new String[]{"lands", "creatures", "planeswalkers", "other spells", "sideboard cards", + private static final String[] SET_VALUES = new String[]{"lands", "creatures", "planeswalkers", "other spells", "sideboard cards", "Instant", "Land", "Enchantment", "Artifact", "Sorcery", "Planeswalker", "Creature"}; - public static final Set IGNORE_NAMES = new HashSet<>(Arrays.asList(SET_VALUES)); + private static final Set IGNORE_NAMES = new HashSet<>(Arrays.asList(SET_VALUES)); private boolean sideboard = false; private boolean switchSideboardByEmptyLine = true; // all cards after first empty line will be sideboard (like mtgo format)