Author: bayard
Date: Thu Sep 1 05:17:32 2011
New Revision: 1163906
URL: http://svn.apache.org/viewvc?rev=1163906&view=rev
Log:
Adding a System.err when a security manager stops JDK 1.5 from being able to access the Sun
Normalizer class. LANG-744
Modified:
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=1163906&r1=1163905&r2=1163906&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java Thu
Sep 1 05:17:32 2011
@@ -744,7 +744,10 @@ public class StringUtils {
} catch (NoSuchMethodException e) {
sunAvailable = false;
} 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;
}
}
|