Change Locale#getMessage to using HashMap#getOrDefault

This commit is contained in:
Fuzzlemann 2017-08-12 00:29:47 +02:00
parent 2a5a671786
commit a1e87089bb

View File

@ -316,8 +316,7 @@ public class Locale implements Closeable {
}
public Message getMessage(Msg msg) {
Message message = messages.get(msg);
return message != null ? message : new Message("");
return messages.getOrDefault(msg, new Message(""));
}
@Override