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` ------------- Commit messages: - JDK-8263436: Silly array comparison in GaloisCounterMode.overlapDetection Changes: https://git.openjdk.java.net/jdk/pull/2938/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2938&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8263436 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/2938.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2938/head:pull/2938 PR: https://git.openjdk.java.net/jdk/pull/2938