mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 16:59:51 +00:00
Product.fromCode() exception message cosmetics.
This commit is contained in:
parent
8ce3279390
commit
0ce2677615
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ public enum Product
|
|||
this.code = code;
|
||||
}
|
||||
|
||||
public static Product fromCode(char code)
|
||||
public static Product fromCode(final char code)
|
||||
{
|
||||
if (code == HIGH_SPEED_TRAIN.code)
|
||||
return HIGH_SPEED_TRAIN;
|
||||
|
@ -58,6 +58,6 @@ public enum Product
|
|||
else if (code == ON_DEMAND.code)
|
||||
return ON_DEMAND;
|
||||
else
|
||||
throw new IllegalArgumentException(Character.toString(code));
|
||||
throw new IllegalArgumentException("unknown code: '" + code + "'");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue