RFR: 8287522: StringConcatFactory: Add in prependers and mixers in batches [v4]
Claes Redestad
redestad at openjdk.java.net
Wed Jun 1 21:10:32 UTC 2022
On Wed, 1 Jun 2022 20:51:50 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address review comments from @ExE-Boss
>
> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line 459:
>
>> 457: String prefix = constants.get(0);
>> 458: if (prefix == null) {
>> 459: if (suffix == null) {
>
> Is it possible for prefix or suffix an empty string (non-null)? The original code checks `if (constant.isEmpty())`
No: Empty string constants would lead to adding a null to the list of constants in the prologue.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8855
More information about the core-libs-dev
mailing list