On Tue, 16 Mar 2021 10:52:25 GMT, Aleksei Efimov <aefi...@openjdk.org> wrote:

>> SonarCloud rightfully says:
>>   The length of "values" is always ">=0", so update this test to either 
>> "==0" or ">0".
>> 
>>         // make sure at least one value was returned
>>         if(values.length < 0) { // <--- here
>>             throw new InvalidAttributeValueException("no values for " +
>>                                                      "attribute "" +
>>                                                      tagName + """);
>>         }
>> 
>> There is a subsequent access to values[0], which means the failure would 
>> throw `AIOOB`, not `InvalidAttributeValueException`.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 fastdebug, `com/sun/jndi`
>
> Marked as reviewed by aefimov (Committer).

Thanks!

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

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

Reply via email to