Today, one of my users has had my app crash on his device because of a strange error. This is the resulting message in my backend:
util.java.MissingResourceException: (Can't find bundle key med?um)
The bundle key is supposed to be "medium" and is build with the following (pseudo) code:
STAGE stage = something.getStage();
String stageValue = stage.name().toLowerCase();
where STAGE
is:
public enum STAGE
{
EASY,
MEDIUM,
HARD;
}
I was under the impression that the name() function would always return the value of the enum as it is in the code: "MEDIUM". How is it possible that it contains a questionmark?