#13 Cannot convert integers under some SecurityManagers

open
nobody
None
5
2010-09-15
2010-09-15
Anonymous
No

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.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks