PropertyResourceBundle WAS Warning Cleanup Day

Rémi Forax forax at univ-mlv.fr
Sat Dec 3 04:54:48 PST 2011


The two constructor of PropertyResourceBundle are unsafe
because they use a Properties which is a HashTable<Object,Object>
to populate a Map<String,Object>.

The way to fix that is to change Properties.load0
to be static and package visible and take a Map<? super String, ? super 
String>
as parameter in order to call it from the constructors
of PropertyResourceBundle.

Because it's a bytecode change, I will not remove the warning from
PropertyResourceBundle.

If someone can create a bug for that :)

cheers,
Rémi



More information about the jdk8-dev mailing list