You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2011/02/27 15:41:26 UTC
svn commit: r1075065 - in /lucene/dev/trunk/lucene: CHANGES.txt
src/java/org/apache/lucene/util/AttributeSource.java
Author: uschindler
Date: Sun Feb 27 14:41:26 2011
New Revision: 1075065
URL: http://svn.apache.org/viewvc?rev=1075065&view=rev
Log:
LUCENE-2315: AttributeSource's methods for accessing attributes are now final, else its easy to corrupt the internal states
Modified:
lucene/dev/trunk/lucene/CHANGES.txt
lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeSource.java
Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1075065&r1=1075064&r2=1075065&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Sun Feb 27 14:41:26 2011
@@ -138,6 +138,9 @@ Changes in backwards compatibility polic
* 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)
+* 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
* LUCENE-2846: omitNorms now behaves like omitTermFrequencyAndPositions, if you
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeSource.java?rev=1075065&r1=1075064&r2=1075065&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeSource.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeSource.java Sun Feb 27 14:41:26 2011
@@ -131,14 +131,14 @@ public class AttributeSource {
/**
* returns the used AttributeFactory.
*/
- public AttributeFactory getAttributeFactory() {
+ public final AttributeFactory getAttributeFactory() {
return this.factory;
}
/** Returns a new iterator that iterates the attribute classes
* 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();
}
@@ -146,7 +146,7 @@ public class AttributeSource {
* This iterator may contain less entries that {@link #getAttributeClassesIterator},
* if one instance implements more than one Attribute interface.
*/
- public Iterator<AttributeImpl> getAttributeImplsIterator() {
+ public final Iterator<AttributeImpl> getAttributeImplsIterator() {
if (hasAttributes()) {
if (currentState == null) {
computeCurrentState();