Adding a System.err when a security manager stops JDK 1.5 from being able to access the Sun Normalizer class. LANG-744

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1163906 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2011-09-01 05:17:32 +00:00
parent ff66dbcf6e
commit 2998309d72
1 changed files with 4 additions and 1 deletions

View File

@ -744,7 +744,10 @@ private static String removeAccentsSUN(CharSequence text)
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
sunAvailable = false; sunAvailable = false;
} catch (java.security.AccessControlException e) { } catch (java.security.AccessControlException e) {
// LANG-744 - thrown in Google App Engine // LANG-744 - thrown when under a SecurityManager
// we are not allowed to access this class
System.err.println("Caught a AccessControlException loading sun.text.Normalizer. " +
"Adjust your security manager if you want to use the stripAccents method. ");
sunAvailable = false; sunAvailable = false;
} }
} }