On Wed, 1 Jun 2022 20:51:50 GMT, Mandy Chung <mch...@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

Reply via email to