Merge branch 'master' into 'master'

Fixed crash caused by checking for ??? edition (CardEdition.UNKNOWN)

See merge request core-developers/forge!6446
This commit is contained in:
Anthony Calosa
2022-03-26 00:37:33 +00:00

View File

@@ -789,6 +789,8 @@ public final class CardEdition implements Comparable<CardEdition> {
public CardEdition getEditionByCodeOrThrow(final String code) { public CardEdition getEditionByCodeOrThrow(final String code) {
final CardEdition set = this.get(code); final CardEdition set = this.get(code);
if (null == set && code.equals("???")) //Hardcoded set ??? is not with the others, needs special check.
return UNKNOWN;
if (null == set) { if (null == set) {
throw new RuntimeException("Edition with code '" + code + "' not found"); throw new RuntimeException("Edition with code '" + code + "' not found");
} }