RFR: 8071571: Move substring of same string to slow path

Remi Forax forax at univ-mlv.fr
Sat Mar 28 08:11:45 UTC 2015


On 03/27/2015 10:59 PM, Martin Buchholz wrote:

[...]

> OTOH, if you touch code that uses the denigrated
>
> char foo[]
>
> please change it to
>
> char[] foo
>
> This is yet another of those global changes to the entire jdk sources that
> nobody ever gets around to.

on the same subject, the Java grammar allows this code to compile
   class A {
    int foo() [] {
      return null;
    }
   }

cheers,
Rémi

>
>
> On Fri, Mar 27, 2015 at 2:51 PM, Lev Priima <lev.priima at oracle.com> wrote:
>
>>   Updated and put some more final in other(not @Deprecated) methods:
>> http://cr.openjdk.java.net/~lpriima/8071571/2/
>>
>> Lev
>>
>> On 03/27/2015 11:50 PM, Martin Buchholz wrote:
>>
>>
>>
>> On Fri, Mar 27, 2015 at 1:49 PM, Lev Priima <lev.priima at oracle.com> wrote:
>>
>>>   Martin,
>>>
>>> You mean it should be like this:
>>>          char[] val = value;    /* avoid getfield opcode */
>>>          int end = val.length;
>>> ?
>>>
>>>
>>   Yes.
>>
>> (although I personally like to write it like this:
>>
>>   final char[] value = this.value;
>>   int end = value.length;
>>
>>
>>
>>




More information about the core-libs-dev mailing list