Retrieved the message mapped with the given key.

Perform the search by iterating over all resource bundles available in reverse order.

@param messageKey the key of the message to translate

@return the translated message or null
770443
private String findMessage(final String messageKey) {
        String message = null;

        try {
            if (!this.resourceBundles.isEmpty()) {
                for (int i = this.resourceBundles.size() - 1; i >= 0 && message == null; i--) {

                    if (this.resourceBundles.get(i).containsKey(messageKey)) {
                        message = this.resourceBundles.get(i).getString(messageKey);
                    }
                }
            }
        } catch (final MissingResourceException e) {
            LOGGER.error("Message key not found into resource bundle", e);
        }

        return message;
    }
1160561
public String get(final String key, final Function<String, String> mapper) {
        try {
            return cache.get(key, () -> mapper.apply(key));
        } catch (final ExecutionException ex) {
            LOGGER.warn("Error fetching {} from cache: {}", key, ex.getMessage());
            return null;
        }
    }
101556
@Override
    protected Object handleGetObject(String key) {
        try {
            return this.messageSource.getMessage(key, null, this.locale);
        } catch (NoSuchMessageException ex) {
            return null;
        }
    }
1075321
protected final String getPackageMessage(String packageName, String key) {
    Option<TextBundle> bundle = registry.load(locale, packageName + ".package");
    return bundle.isDefined() ? bundle.get().getText(key) : null;
  }
169107
@Override
    public HelpModule get(String key) {
        key = HelpModule.getLocalizedId(key, Localizer.getDefaultLocale());
        
        while (!key.isEmpty()) {
            HelpModule helpModule = super.get(key);
            
            if (helpModule != null) {
                return helpModule;
            }
            
            int i = key.lastIndexOf('_');
            key = i < 0 ? "" : key.substring(0, i);
        }
        
        return null;
    }
769083
public String getMessage(String key, Object[] parameters)
	{
		return getMessage(key, Locale.getDefault(), parameters);
	}
906208
public String get(final String key) {
        return get(Keys.LANGUAGE, key, Locales.getLocale());
    }
1356438
protected final String getClassMessage(String className, String key) {
    registry.load(locale, Strings.substringBeforeLast(className, ".") + ".package");
    Option<TextBundle> bundle = registry.load(locale, className);
    return bundle.isDefined() ? bundle.get().getText(key) : null;
  }
402311
public static String getText(String key, ResourceBundle bundle)
    {
        try
        {
            return  bundle.getString(key);
        }
        catch (MissingResourceException ex)
        {
            return key;
        }
    }
750389
public MyfacesLogMessage getMyfacesMessage(MyfacesLogKey key)
    {
        MyfacesLogMessage facesMessage = new MyfacesLogMessage();
        try
        {

            String name = key.name();
            String summary = _log.getResourceBundle().getString(name);
            facesMessage.setSummary(summary);
            try
            {
                String detail = _log.getResourceBundle().getString(name +"_detail");
                facesMessage.setDetail(detail);
            }
            catch (MissingResourceException e)
            {
                facesMessage.setDetail(name);
            }

            try
            {
                String related = _log.getResourceBundle().getString(name +"_related");
                facesMessage.setRelated(related);
            }
            catch (MissingResourceException e)
            {
                /// ignore
            }
            return facesMessage;
        }
        catch (MissingResourceException mre)
        {
            facesMessage.setSummary(key.name());
            return facesMessage;
        }
    }
817256
public final String get(final String pkey) {
    try {
      // Replace "." with "_" in the key to match what ConstantsImplCreator does.
      return pkey == null ? null : messages.getString(pkey.replace(".", "_"));
    } catch (final MissingResourceException e) {
      return null;
    }
  }
688314
CmsFlexCacheKey getKey(String resource) {

        if (!isEnabled()) {
            return null;
        }
        Object o = m_keyCache.get(resource);
        if (o != null) {
            if (LOG.isDebugEnabled()) {
                LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHEKEY_FOUND_1, resource));
            }
            return ((CmsFlexCacheVariation)o).m_key;
        } else {
            if (LOG.isDebugEnabled()) {
                LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHEKEY_NOT_FOUND_1, resource));
            }
            return null;
        }
    }
152446
public String getMessage(String key)
    {
        try
        {
            return _log.getResourceBundle().getString(key);
        }
        catch (MissingResourceException mre)
        {
            return key;
        }
    }
680736
public T get(final int key) {
		int index = ((key & 0x7FFFFFFF) % elementKeys.length);

		long m = elementKeys[index];
		if (key == m) {
			return elementValues[index];
		}

		return null;
	}
1104781
public List<ValidationMessage<Origin>> getMessages(String messageKey, Severity severity) {

		List<ValidationMessage<Origin>> messages = new ArrayList<ValidationMessage<Origin>>();

        for (ValidationResult result : results) {
            for (ValidationMessage<Origin> message : result.getMessages()) {
                if (messageKey.equals(message.getMessageKey()) && severity.equals(message.getSeverity())) {
                    messages.add(message);
                }
            }
        }

        return messages;
	}
287907
public String importMessage(String key, Locale locale) {

        key = key.trim();
        String[] tokens = key.split("#");
        if (tokens.length != 2) {
            return null;
        }
        String className = tokens[0];
        String messageName = tokens[1];
        try {
            Method messagesGet = Class.forName(className).getMethod("get");
            I_CmsMessageBundle bundle = (I_CmsMessageBundle)(messagesGet.invoke(null));
            return bundle.getBundle(locale).key(messageName);
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
            return null;
        }
    }
101388
@Trivial
    public static final String getMessage(String key, Object... params) {
        return TraceNLS.getFormattedMessage(Utils.class, tc.getResourceBundleName(), key, params, key);
    }