ResourceBundleMessageSource's cachedBundleMessageFormats cache is declared as:

Map<ResourceBundle, Map<String, Map<Locale, MessageFormat>>>

But ResourceBundle already contains a Locale property. So why not declare it as the following?

Map<ResourceBundle,Map<String, MessageFormat>>

Comment From: snicoll

But ResourceBundle already contains a Locale property. So why not declare it as the following?

Because the code needs to be able to find an entry based on the basename and the locale. The current signature allows us to do that.