commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1165701 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
Date Thu, 08 Sep 2011 16:39:30 GMT
On 8 September 2011 16:07, sebb <sebbaz@gmail.com> wrote:
> On 8 September 2011 07:42, Henri Yandell <flamefew@gmail.com> wrote:
>> On Tue, Sep 6, 2011 at 8:16 AM,  <sebb@apache.org> wrote:
>>> Author: sebb
>>> Date: Tue Sep  6 15:16:47 2011
>>> New Revision: 1165701
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1165701&view=rev
>>> Log:
>>> LANG-744 StringUtils throws java.security.AccessControlException on Google App
Engine
>>> Change static code to catch and save Exception; only report failure if no method
is available
>>>
>>> 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=1165701&r1=1165700&r2=1165701&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
Tue Sep  6 15:16:47 2011
>>> @@ -630,13 +630,14 @@ public class StringUtils {
>>>         }
>>>         try {
>>>             String result = null;
>>> -            if (java6Available) {
>>> +            if (java6NormalizeMethod != null) {
>>>                 result = removeAccentsJava6(input);
>>> -            } else if (sunAvailable) {
>>> +            } else if (sunDecomposeMethod != null) {
>>>                 result = removeAccentsSUN(input);
>>>             } else {
>>>                 throw new UnsupportedOperationException(
>>> -                    "The stripAccents(CharSequence) method requires
at least Java 1.6 or a Sun JVM");
>>> +                    "The stripAccents(CharSequence) method requires
at least Java 1.6 or a Sun JVM",
>>> +                    new UnsupportedOperationException(java6Exception));
>>
>> Was it intended to have the same Exception twice? UOE in UOE?
>
> Well spotted!
>
> The intention was to wrap both the java6 and sun6 exceptions into the
> main UOE, but it looks like I messed that up.
>
> I'll fix that shortly.

Not possible to use chaining here - we have two unrelated Exceptions -
so added both exception texts to the UOE.

>> Hen
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message