String value = null;
value = currentLanguage.getProperty(key);
if (value == null) {
- return key;
+ System.out.println("please fix “" + key + "”!");
+ return null;
}
if ((parameters != null) && (parameters.length > 0)) {
return MessageFormat.format(value, parameters);
*/
public static int getKey(String key) {
String value = currentLanguage.getProperty(key);
- if (value == null) {
- return -1;
- }
- if (value.startsWith("VK_")) {
+ if ((value != null) && value.startsWith("VK_")) {
try {
Field field = KeyEvent.class.getField(value);
return field.getInt(null);
/* ignore. */
}
}
- return value.toUpperCase().charAt(0);
+ System.err.println("please fix “" + key + "”!");
+ return KeyEvent.VK_UNDEFINED;
}
/**