public String getString ( String messageKey ) { String retVal = messageKey ; ResourceBundle rb = getResourceBundle ( ) ; if ( null != rb ) { try { String tmpRetVal = rb . getString ( messageKey ) ; if ( null != tmpRetVal ) { retVal = tmpRetVal ; // } else { // if (quiet) { // // logger.log(Level.FINEST, // "Cannot find message key {2}, in resource bundle {0} for locale {1}, will return the message key.", // new Object[] { ivBundleName, ivLocale.toString(), // messageKey }); // if (logger.isLoggable(Level.FINEST)) { // logger.log(Level.FINEST, "stack trace is ", new // Exception()); // } // } } } catch ( MissingResourceException e ) { // if (quiet) { // // logger.log(Level.FINEST, // "Cannot find message key {2}, in resource bundle {0} for locale {1}, due to exception {3}, will return the message key.", // new Object[] { ivBundleName, ivLocale.toString(), messageKey, // e }); // } } // } else { // if (quiet) { // // // info so this can be fixed // logger.log(Level.FINEST, // "Cannot find message key {2}, in resource bundle {0} for locale {1}, will return the message key.", // new Object[] { ivBundleName, ivLocale.toString(), messageKey }); // if (logger.isLoggable(Level.FINEST)) { // logger.log(Level.FINEST, "stack trace is ", new Exception()); // } // } } return retVal ; }
Retrieve a message key from the resource bundle