[10] RFR: 8184603: Create ObjectStreamField signature lazily when possible

Claes Redestad claes.redestad at oracle.com
Fri Jul 14 12:47:03 UTC 2017

On 2017-07-14 14:32, Chris Hegarty wrote:
>> On 14 Jul 2017, at 13:19, Claes Redestad <claes.redestad at oracle.com> wrote:
>> Hi,
>> as a small startup optimization, we could make some setup in ObjectStreamField
>> lazier by calculating the signature field at first use.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8184603
>> Webrev: http://cr.openjdk.java.net/~redestad/8184603/jdk.00/
> I think this is ok.  Should toString also use getSignature?

Yes, I thought I'd done that already.

> For extra points remove the superfluous null assignment of
> `signature` and `field` ( as well as `offset` ).

'field' is final so that'd make javac cry bloody murder, but I fixed the
rest and cleaned up a bit for consistency:




More information about the core-libs-dev mailing list