Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4425

Unclear documentation of StoredFieldVisitor.binaryValue

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      When reading the binary value of a stored field, a StoredFieldsReader calls StoredFieldVisitor.binaryValue(arr, offset, length).

      Documentation currently doesn't state whether the byte[] can be reused outside of the scope of StoredFieldVisitor.binaryValue but DocumentStoredFieldVisitor assumes (as of r1389812) that it can.

      So DocumentStoredFieldVisitor would break with a custom StoredFieldsFormat that would call StoredFieldVisitor.binaryValue with a slice of a reusable buffer.

        Attachments

        1. LUCENE-4425.patch
          5 kB
          Robert Muir
        2. LUCENE-4425.patch
          5 kB
          Robert Muir

          Activity

            People

            • Assignee:
              rcmuir Robert Muir
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: