Re: RFR 8234147 : Avoid looking up standard charsets in core libraries

2019-12-01 Thread Alan Bateman
On 01/12/2019 08:44, Ivan Gerasimov wrote: : Personally, I think that using constants sun.nio.cs.xxx.INSTANCE is not too bad even in the code that is unlikely to be executed during the VM startup.  One small advantage is that if the code is copy/pasted within the java.base module, it will not

Re: RFR 8234147 : Avoid looking up standard charsets in core libraries

2019-12-01 Thread Ivan Gerasimov
Hi Ulf! Thank you for the links! The enhancement requests that you pointed out are about making the lookup faster. My current proposal, however, is to completely avoid the lookup of the standard charsets in certain specific cases. With kind regards, Ivan On 11/30/19 1:32 PM, Ulf Zibis wr

Re: RFR 8234147 : Avoid looking up standard charsets in core libraries

2019-12-01 Thread Ivan Gerasimov
Thank you Alan for the further review! On 11/27/19 12:53 PM, Alan Bateman wrote: On 27/11/2019 11:52, Ivan Gerasimov wrote: : It's not clear how to distinguish the classes inside the java.base module that do not have to depend on sun.nio.cs.  If you feel strong about NTLM and XML, I can repl

Re: RFR 8234147 : Avoid looking up standard charsets in core libraries

2019-11-30 Thread Ulf Zibis
Hi Ivan, you may compare your proposal with: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6790402 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6850361 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6796087 -Ulf Am 27.11.19 um 05:39 schrieb Ivan Gerasimov: Hello! It is a

Re: RFR 8234147 : Avoid looking up standard charsets in core libraries

2019-11-27 Thread Alan Bateman
On 27/11/2019 11:52, Ivan Gerasimov wrote: : It's not clear how to distinguish the classes inside the java.base module that do not have to depend on sun.nio.cs.  If you feel strong about NTLM and XML, I can replace sun.nio.cs.* instances with corresponding java.charset.StandardCharsets.* cons

Re: RFR 8234147 : Avoid looking up standard charsets in core libraries

2019-11-27 Thread Ivan Gerasimov
Thank you Alan for reviewing! Please see the comments inline. On 11/26/19 11:54 PM, Alan Bateman wrote: On 27/11/2019 04:39, Ivan Gerasimov wrote: Hello! It is a cleanup fix with mostly two kinds of changes: - when a standard charset is specified by its name, use a preinitialized Charset con

Re: RFR 8234147 : Avoid looking up standard charsets in core libraries

2019-11-26 Thread Alan Bateman
On 27/11/2019 04:39, Ivan Gerasimov wrote: Hello! It is a cleanup fix with mostly two kinds of changes: - when a standard charset is specified by its name, use a preinitialized Charset constant instead, - replace the usage of StandardCharset.* constants with their sun.nio.cs.* equivalents to a