On Fri, 9 Dec 2022 14:35:47 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Newer version of IntelliJ IDEA introduces new 
>> [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases)
>>  detecting redundant array length check in snippets like
>> 
>> <T> void iterate(T[] items) {
>>   if (items.length == 0) {
>>     return;
>>   }
>>   for (T item : items) {
>>     //...
>>   }
>> }
>> 
>> Here
>> 
>> if (items.length == 0) {
>>   return;
>> }
>> 
>> is redundant and can be removed as length check is performed by for-each 
>> loop.
>
> @stsypanov , @TheShermanTanker You jumped the gun a bit on the integration 
> and sponsoring. There was no approval for the core-libs parts from a 
> "R"eviewer.

@RogerRiggs changes are trivial. Should I revert any of them?

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

PR: https://git.openjdk.org/jdk/pull/11589

Reply via email to