code: protected MessageFormat getMessageFormat(ResourceBundle bundle, String code, Locale locale)
              throws MissingResourceException {
          Map<String, Map<Locale, MessageFormat>> codeMap = this.cachedBundleMessageFormats.get(bundle);
          Map<Locale, MessageFormat> localeMap = null;
          if (codeMap != null) {
              localeMap = codeMap.get(code);
              if (localeMap != null) {
                  MessageFormat result = localeMap.get(locale);
                  if (result != null) {
                      return result;
                  }
              }
          }
  
          String msg = getStringOrNull(bundle, code);
          if (msg != null) {
              if (codeMap == null) {
                  codeMap = new ConcurrentHashMap<>();
                  Map<String, Map<Locale, MessageFormat>> existing =
                          this.cachedBundleMessageFormats.putIfAbsent(bundle, codeMap);
                  if (existing != null) {
                      codeMap = existing;
                  }
              }
              if (localeMap == null) {
                  localeMap = new ConcurrentHashMap<>();
                  Map<Locale, MessageFormat> existing = codeMap.putIfAbsent(code, localeMap);
                  if (existing != null) {
                      localeMap = existing;
                  }
              }
              MessageFormat result = createMessageFormat(msg, locale);
              localeMap.put(locale, result);
              return result;
          }
          return null;
      }
docs: Return a MessageFormat for the given bundle and code,
  fetching already generated MessageFormats from the cache.
  
  @param bundle the ResourceBundle to work on
  @param code the message code to retrieve
  @param locale the Locale to use to build the MessageFormat
  @return the resulting MessageFormat, or {@code null} if no message defined for the given code
  @throws MissingResourceException if thrown by the ResourceBundle