RFR: 8266796: Clean up the unnecessary code in the method UnsharedNameTable#fromUtf

Guoxiong Li gli at openjdk.java.net
Mon May 10 14:06:54 UTC 2021


On Mon, 10 May 2021 14:00:51 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Hi all,
>> 
>> This little patch cleans up the redundant code. Please see the code below. 
>> 
>> 
>>         while (element != null) {
>>             if (element == null) {
>>                 break;
>>             }
>> 
>> 
>> The `while (element != null)` has already checked the `element`. So the `if (element == null)` is redundant and unnecessary.
>> 
>> Thank you for taking the time to review.
>> 
>> Best Regards,
>> -- Guoxiong
>
> Looks good

@mcimadamore Thanks for your review. Could I get your help to sponsor this patch?

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

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


More information about the compiler-dev mailing list