mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix NPE in KeywordsChange.
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
package forge.game;
|
package forge.game;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
@@ -31,27 +30,21 @@ import com.google.common.collect.Lists;
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class KeywordsChange {
|
public class KeywordsChange {
|
||||||
// takes care of individual card types
|
private final List<String> keywords;
|
||||||
private List<String> keywords = new ArrayList<String>();
|
private final List<String> removeKeywords;
|
||||||
private List<String> removeKeywords = new ArrayList<String>();
|
private final boolean removeAllKeywords;
|
||||||
private boolean removeAllKeywords = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Card_Keywords.
|
* Construct a new {@link KeywordsChange}.
|
||||||
*
|
*
|
||||||
* @param keywordList
|
* @param keywordList the list of keywords to add.
|
||||||
* an ArrayList<String>
|
* @param removeKeywordList the list of keywords to remove.
|
||||||
* @param removeKeywordList
|
* @param removeAll whether to remove all keywords.
|
||||||
* a ArrayList<String>
|
|
||||||
* @param removeAll
|
|
||||||
* a boolean
|
|
||||||
* @param stamp
|
|
||||||
* a long
|
|
||||||
*/
|
*/
|
||||||
public KeywordsChange(final List<String> keywordList, final List<String> removeKeywordList, final boolean removeAll) {
|
public KeywordsChange(final List<String> keywordList, final List<String> removeKeywordList, final boolean removeAll) {
|
||||||
this.keywords = Lists.newArrayList(keywordList);
|
this.keywords = keywordList == null ? Lists.<String>newArrayList() : Lists.newArrayList(keywordList);
|
||||||
this.removeKeywords = Lists.newArrayList(removeKeywordList);
|
this.removeKeywords = removeKeywordList == null ? Lists.<String>newArrayList() : Lists.newArrayList(removeKeywordList);
|
||||||
this.removeAllKeywords = removeAll;
|
this.removeAllKeywords = removeAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user