mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
simplify string generation
This commit is contained in:
@@ -303,7 +303,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
enumType = Type.valueOf(type.toUpperCase(Locale.ENGLISH));
|
enumType = Type.valueOf(type.toUpperCase(Locale.ENGLISH));
|
||||||
} catch (IllegalArgumentException ignored) {
|
} catch (IllegalArgumentException ignored) {
|
||||||
// ignore; type will get UNKNOWN
|
// ignore; type will get UNKNOWN
|
||||||
System.err.println(TextUtil.concatWithSpace("Ignoring unknown type in set definitions: name:", TextUtil.addSuffix(res.name, ";"), "type:", type));
|
System.err.println("Ignoring unknown type in set definitions: name: " + res.name + "; type: " + type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res.type = enumType;
|
res.type = enumType;
|
||||||
@@ -389,7 +389,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
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) {
|
if (null == set) {
|
||||||
throw new RuntimeException(TextUtil.concatWithSpace("Edition with code", TextUtil.enclosedSingleQuote(code), "not found"));
|
throw new RuntimeException("Edition with code '" + code + "' not found");
|
||||||
}
|
}
|
||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user