RFR: 8071571: Move substring of same string to slow path
Lev Priima
lev.priima at oracle.com
Mon Mar 30 21:13:28 UTC 2015
Martin,
So I've updated webrev w/o adding final everywhere:
http://cr.openjdk.java.net/~lpriima/8071571/3/ .
Lev
On 03/28/2015 01:15 AM, Lev Priima wrote:
> On 03/28/2015 12:59 AM, Martin Buchholz wrote:
>> I was only suggesting using final in the stylized
>>
>> final Type foo = this.foo;
>>
>> Using final for other local variables is going further than most jdk
>> maintainers (including myself) go.
> I think we could start from one file.
>>
>> OTOH, if you touch code that uses the denigrated
>>
>> char foo[]
>>
>> please change it to
>>
>> char[] foo
> Only for touched lines? If no, I can start from:
> 118 private final char value[];
> And go further to many methods signatures:
> 169 public String(char value[]) {
>> This is yet another of those global changes to the entire jdk sources
>> that nobody ever gets around to.
>>
>>
>> On Fri, Mar 27, 2015 at 2:51 PM, Lev Priima <lev.priima at oracle.com
>> <mailto: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/
>> <http://cr.openjdk.java.net/%7Elpriima/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 <mailto: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