inefficient indexof when String has one length
Otávio Gonçalves de Santana
otaviopolianasantana at gmail.com
Sun Jan 25 22:30:14 UTC 2015
Can anyone help me as sponsor?
On May 27, 2014 2:17 PM, "Otávio Gonçalves de Santana" <
otaviopolianasantana at gmail.com> wrote:
> Can anyone help me as sponsor?
> On May 12, 2014 1:57 PM, "Paul Sandoz" <paul.sandoz at oracle.com> wrote:
>
>> On Apr 26, 2014, at 12:56 PM, Otávio Gonçalves de Santana <
>> otaviojava at java.net> wrote:
>> > When a String has length just one, could be replaced by equivalent
>> > character literals, gaining some performance enhancement.
>> >
>> > I found 107 changes.
>> >
>>
>> This looks good to me, just one small issue:
>>
>> ---
>> a/src/share/classes/javax/security/auth/PrivateCredentialPermission.java
>> Wed Apr 23 11:35:40 2014 -0700
>> +++
>> b/src/share/classes/javax/security/auth/PrivateCredentialPermission.java
>> Sat Apr 26 07:31:04 2014 -0300
>> @@ -495,7 +495,7 @@
>>
>> // perform new initialization from the permission name
>>
>> - if (getName().indexOf(" ") == -1 && getName().indexOf("\"") ==
>> -1) {
>> + if (getName().indexOf(' ') == -1 && getName().indexOf('\"') ==
>> -1) {
>>
>> You no longer need to escape the double quote.
>>
>> Can someone else sponsor this? unfortunately i do not have the time at
>> the moment.
>>
>> Paul.
>>
>
More information about the core-libs-dev
mailing list