LANG-744 StringUtils throws java.security.AccessControlException on Google App Engine

Display both Java6 and Sun exceptions when neither is available for stripAccents

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1166786 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2011-09-08 16:37:26 +00:00
parent 603d818735
commit 0ee2a1ec2c
1 changed files with 3 additions and 2 deletions

View File

@ -636,8 +636,9 @@ public class StringUtils {
result = removeAccentsSUN(input);
} else {
throw new UnsupportedOperationException(
"The stripAccents(CharSequence) method requires at least Java 1.6 or a Sun JVM",
new UnsupportedOperationException(java6Exception));
"The stripAccents(CharSequence) method requires at least"
+" Java6, but got: "+java6Exception
+"; or a Sun JVM: "+sunException);
}
// Note that none of the above methods correctly remove ligatures...
return result;