RFR: 8184665: Skip name and alias checks for standard Charsets
xueming.shen at oracle.com
Tue Jul 18 14:59:34 UTC 2017
* the test needs a bugid before pushing.
On 7/18/17, 7:16 AM, Claes Redestad wrote:
> Hi Sherman,
> On 07/14/2017 07:42 PM, Xueming Shen wrote:
>> Hi Claes,
>> The change looks fine.
>> The only concern is that, in theory, it appears we no longer have any
>> to guarantee that all "alias" names defined for these 3 charsets
>> indeed follow
>> the spec? The consequence of this is that someone can obtain the
>> alias name
>> from the specific "charset", and then that name will fail for
>> I doubt we currently have a regression test to catch this.
>> The possibility that we are going to add a new alias for these 3 is
>> low, but either
>> a regress test (if we don't have one already) or a comment at
>> (for each of the def, to remind a possible change) might help to
>> prevent this
>> from happening?
> added regression sanity test, and reverted to use identity checks as
> elsewhere (if we are to clean this up to use equals everywhere,
> better do it consistently throughout the code and ensure this works as
> expected with no performance loss):
>> PS: The next step is to remove these 3 from the
>> sun.nio.cs.StandardCharsets? :-)
> The static initializer for sun.nio.cs.StandardCharsets is loading a
> bunch of Strings
> into the string table but only executes around 1.5k bytecode, so
> splitting these
> always-loaded Charsets out might be a small footprint gain, but a very
> tiny startup
> win at best.
More information about the core-libs-dev