class MessageUtil {

    public static String getMessage(ResourceBundle bundle, String key, Object...params) {
        if (bundle == null || key == null) {
            return key;
        }

        try {
            return formatMessage(bundle.getString(key), params);
        } catch (MissingResourceException e) {
            return key;
        }
    }

}