MessageFormat form = new MessageFormat(getBundle().getString(key));  if (arg instanceof String) { return form.format(new Object[] { arg }); } else if (arg instanceof Object[]) { return form.format(arg); } else { log.error("arg '" + arg + "' not String or Object[]");  return ""; }
return message;
    public String getText(String key, Object arg) {        if (arg == null) {            return getBundle().getString(key);        }        MessageFormat form = new MessageFormat(getBundle().getString(key));        if (arg instanceof String) {            return form.format(new Object[] { arg });        } else if (arg instanceof Object[]) {            return form.format(arg);        } else {            log.error("arg '" + arg + "' not String or Object[]");            return "";        }    }