- 
        Couldn't load subscription status. 
- Fork 38.8k
Description
Adrien Bonnin opened SPR-10136 and commented
When I try to use containsKey method on a MessageSourceResourceBundle instance I got the following NullPointerException :
Exception in thread "main" java.lang.NullPointerException
at java.util.ResourceBundle.handleKeySet(ResourceBundle.java:1787)
at java.util.ResourceBundle.containsKey(ResourceBundle.java:1741)
at net.toto.main(Main.java:36)
Here is a sample code :
Locale locale = Locale.getDefault();
ResourceBundleMessageSource bundle = new ResourceBundleMessageSource();
bundle.setBasename("bundles.Main");
System.out.println(bundle.getMessage("settings", new Object[0], locale));
MessageSourceResourceBundle bundle2 = new MessageSourceResourceBundle(bundle, locale);
System.out.println(bundle2.getString("settings"));
bundle2.containsKey("settings"); // NullPointerException
Affects: 3.1.2
Backported to: 3.1.4