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

Unclear documentation of StoredFieldVisitor.binaryValue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0
    • 4.0, 6.0
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: