RFR: 8184665: Skip name and alias checks for standard Charsets
forax at univ-mlv.fr
Fri Jul 14 18:01:24 UTC 2017
I do not like the equals in the constructor of Charset given that in StandardCharsets, == is used.
I think the constructor of Charset should use == and a comment should be added explaining why it's valid to use == like in StandardCharsets.
----- Mail original -----
> De: "Roger Riggs" <Roger.Riggs at Oracle.com>
> À: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Vendredi 14 Juillet 2017 19:12:09
> Objet: Re:  RFR: 8184665: Skip name and alias checks for standard Charsets
> Thanks, Roger
> On 7/14/2017 1:03 PM, Claes Redestad wrote:
>> Hi Roger,
>> On 2017-07-14 18:25, Roger Riggs wrote:
>>> Hi Claes,
>>> Using == with references always looks a bit suspicious in the source
>>> code, especially strings.
>>> Since the first thing in equals() is the identity check, I'd suggest
>>> using .equals for the comparisons.
>> Sure, there's no significant performance difference, even in
>> interpreted mode:
> > /Claes
More information about the core-libs-dev