mirror of https://github.com/apache/lucene.git
LUCENE-2315: AttributeSource's methods for accessing attributes are now final, else its easy to corrupt the internal states
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1075065 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b76bef12fd
commit
b77a33362c
|
@ -138,6 +138,9 @@ Changes in backwards compatibility policy
|
||||||
* LUCENE-2236: Similarity can now be configured on a per-field basis. See the
|
* LUCENE-2236: Similarity can now be configured on a per-field basis. See the
|
||||||
migration notes in MIGRATE.txt for more details. (Robert Muir, Doron Cohen)
|
migration notes in MIGRATE.txt for more details. (Robert Muir, Doron Cohen)
|
||||||
|
|
||||||
|
* LUCENE-2315: AttributeSource's methods for accessing attributes are now final,
|
||||||
|
else its easy to corrupt the internal states. (Uwe Schindler)
|
||||||
|
|
||||||
Changes in Runtime Behavior
|
Changes in Runtime Behavior
|
||||||
|
|
||||||
* LUCENE-2846: omitNorms now behaves like omitTermFrequencyAndPositions, if you
|
* LUCENE-2846: omitNorms now behaves like omitTermFrequencyAndPositions, if you
|
||||||
|
|
|
@ -131,14 +131,14 @@ public class AttributeSource {
|
||||||
/**
|
/**
|
||||||
* returns the used AttributeFactory.
|
* returns the used AttributeFactory.
|
||||||
*/
|
*/
|
||||||
public AttributeFactory getAttributeFactory() {
|
public final AttributeFactory getAttributeFactory() {
|
||||||
return this.factory;
|
return this.factory;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns a new iterator that iterates the attribute classes
|
/** Returns a new iterator that iterates the attribute classes
|
||||||
* in the same order they were added in.
|
* in the same order they were added in.
|
||||||
*/
|
*/
|
||||||
public Iterator<Class<? extends Attribute>> getAttributeClassesIterator() {
|
public final Iterator<Class<? extends Attribute>> getAttributeClassesIterator() {
|
||||||
return Collections.unmodifiableSet(attributes.keySet()).iterator();
|
return Collections.unmodifiableSet(attributes.keySet()).iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ public class AttributeSource {
|
||||||
* This iterator may contain less entries that {@link #getAttributeClassesIterator},
|
* This iterator may contain less entries that {@link #getAttributeClassesIterator},
|
||||||
* if one instance implements more than one Attribute interface.
|
* if one instance implements more than one Attribute interface.
|
||||||
*/
|
*/
|
||||||
public Iterator<AttributeImpl> getAttributeImplsIterator() {
|
public final Iterator<AttributeImpl> getAttributeImplsIterator() {
|
||||||
if (hasAttributes()) {
|
if (hasAttributes()) {
|
||||||
if (currentState == null) {
|
if (currentState == null) {
|
||||||
computeCurrentState();
|
computeCurrentState();
|
||||||
|
|
Loading…
Reference in New Issue