Cannot convert integers under some SecurityManagers
Brought to you by:
aalmiray
AbstractIntegerMorpher uses the following code to 'stringify' a number:
Locale defaultLocale = Locale.getDefault();
String str = null;
try{
Locale.setDefault( Locale.US );
str = String.valueOf( obj );
}
finally{
Locale.setDefault( defaultLocale );
}
This breaks under SecurityManagers which don't allow global properties to be set, as is the case with a typical shared Tomcat setup. Also, it's not thread safe as the change will be visible to other threads.