commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D. Gregory (JIRA)" <>
Subject [jira] [Commented] (LANG-744) StringUtils throws on Google App Engine
Date Fri, 02 Sep 2011 00:18:10 GMT


Gary D. Gregory commented on LANG-744:

Well, I've ruminated, pondered and experimented.

Running all unit tests with a security managers results in:

Tests run: 2046, Failures: 2, Errors: 115, Skipped: 0

Clearly, we need a good overall solution to avoid 117 new Jiras (an exaggeration I know.)

I've created a JAAS policy file to grant just enough permissions to run the unit tests in

The file contains instructions for using it with JAAS.

What this shows is that we should either:

# Run all unit tests a second time with JAAS enabled, or
# Run all unit tests with JAAS enabled, always

We should our solution as a pattern for other Commons component.

Specifically for StringUtils, should we have a SunStringUtils? This would let you know that
you are depending on com.sun code.

> StringUtils throws on Google App Engine
> ----------------------------------------------------------------------------
>                 Key: LANG-744
>                 URL:
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.0.1
>         Environment: Google App Engine
>            Reporter: Clément Denis
>             Fix For: 3.0.2
> In the static initializer of org.apache.commons.lang3.StringUtils, there is an attempt
to load the class sun.text.Normalizer.
> Such a class is prohibited on Google App Engine, and the static intializer throws a
> {code}
> Caused by: access denied (java.lang.RuntimePermission
> 	at
> 	at
> 	at java.lang.SecurityManager.checkPermission(
> 	at$CustomSecurityManager.checkPermission(
> 	at java.lang.SecurityManager.checkPackageAccess(
> 	at java.lang.Class.checkMemberAccess(
> 	at java.lang.Class.getMethod(
> 	at org.apache.commons.lang3.StringUtils.<clinit>(
> {code}
> The exception should be caught in the catch clauses around loadClass("sun.text.Normalizer").
> Commons lang 2 worked fine on GAE.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message