Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8263436

Silly array comparison in GaloisCounterMode.overlapDetection

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: security-libs

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shade Aleksey Shipilev
              Reporter:
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: