RFR: 8282429: StringBuilder/StringBuffer.toString() skip compressing for UTF16 strings [v2]

Xin Liu xliu at openjdk.java.net
Tue Mar 8 00:16:04 UTC 2022


On Mon, 7 Mar 2022 12:10:51 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   make sure String(StringBuffer) is still synchronized.
>
> src/java.base/share/classes/java/lang/String.java line 1446:
> 
>> 1444:      */
>> 1445:     public String(StringBuffer buffer) {
>> 1446:         this(buffer, null);
> 
> This method is no longer synchronized on StringBuffer

you're right. fixed in revision#2. 
this could be very tricky to discover. thanks for the head-up!

-------------

PR: https://git.openjdk.java.net/jdk/pull/7671


More information about the core-libs-dev mailing list