commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clément Denis (JIRA) <>
Subject [jira] [Commented] (LANG-744) StringUtils throws on Google App Engine
Date Thu, 25 Aug 2011 15:13:29 GMT


Clément Denis commented on LANG-744:

I don't agree with that.
The security manager cannot be changed in GAE, or in any other managed environment with strong
security policiy.

The use of a sun.* class is basically a hack, so I don't see why it should prevent me from
using StringUtils in GAE.
>From a user point of view, it's a huge regression (I think I'm right when I say that StringUtils
is one of the most widely used class in commons-lang).

It would be acceptable if the method stripAccents raised a RuntimeError if no Normalizer could
be found.
But this bug prevents the use of the whole class.

> 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