Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1049

Blobs shouldn't be Comparable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.10
    • core
    • None

    Description

      In OAK-350 Blobs were made Comparable to make them easier to compare in higher-level code.

      Unfortunately the implementation is broken (compareTo is not transitive) and potentially very slow for large binaries, which suggests that it shouldn't be exposed at least on the public API level.

      Thus I suggest to drop the Comparable feature from Blobs and replace the few places where it is needed with equals() checks or explicit scanning of the streams.

      Attachments

        Activity

          People

            jukkaz Jukka Zitting
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: