Integrated: 8263436: Silly array comparison in GaloisCounterMode.overlapDetection

Aleksey Shipilev shade at openjdk.java.net
Fri Mar 12 07:38:08 UTC 2021


On Thu, 11 Mar 2021 11:22:40 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> SonarCloud reports:
>   Use "Arrays.equals(array1, array2)" or the "==" operator instead of using the "Object.equals(Object obj)" method.
> 
>         } else if (!src.isDirect() && !dst.isDirect()) {
>             if (!src.isReadOnly()) {
>                 // If using the heap, check underlying byte[] address.
>                 if (!src.array().equals(dst.array()) ) { // <--- here
> 
> Additional testing:
>   - [x] Linux x86_64 fastdebug `jdk_security`

This pull request has now been integrated.

Changeset: 9f6b1d7f
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/9f6b1d7f
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8263436: Silly array comparison in GaloisCounterMode.overlapDetection

Reviewed-by: ascarpino

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

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



More information about the security-dev mailing list