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

Have a warning comment for AttributeSource.captureState

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 9.0, 8.7
    • general/javadocs
    • None
    • New

    Description

      AttributeSource.captureState is a powerful method that can be used to store and (later on) restore the current state, but it comes with a cost of copying all attributes in this source and sometimes can be a big cost if called multiple times.

      We could probably add a warning to indicate this cost, as this method is encapsulated quite well and sometimes people who use it won't be aware of the cost.

      Attachments

        1. LUCENE-9424.patch
          0.7 kB
          Patrick Zhai

        Activity

          People

            Unassigned Unassigned
            zhai7631 Patrick Zhai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: