LUCENE-9424: add a performance warning to AttributeSource.captureState javadocs

This commit is contained in:
Mike McCandless 2020-07-27 11:11:35 -04:00
parent 6bf5f4a87f
commit e4c2be98fa
2 changed files with 8 additions and 0 deletions

View File

@ -183,6 +183,12 @@ Bug Fixes
---------------------
(No changes)
Documentation
---------------------
* LUCENE-9424: Add a performance warning to AttributeSource.captureState javadocs (Haoyu Zhai)
Other
---------------------
(No changes)

View File

@ -292,6 +292,8 @@ public class AttributeSource {
/**
* Captures the state of all Attributes. The return value can be passed to
* {@link #restoreState} to restore the state of this or another AttributeSource.
*
* Be careful, this method comes with a cost of deep copying all attributes in the source.
*/
public final State captureState() {
final State state = this.getCurrentState();