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

ModuleReferenceImpl.computeHash should record algorithm for cache checks

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 11, 17, 18, 19, 20
    • core-libs
    • None

      Look at implementation and figure out what happens if you do:

      ```
       computeHash("SHA-1") = someHash;
       computeHash("SHA-256") = ...?
      ```

      The caching method should actually check the algorithms match.

      Does not seem to be a problem at this point, since we seem to be only calling that methods with "SHA-256", but this is a landmine ready to fire.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: