LUCENE-5275: Change AttributeSource.toString to display the current state of attributes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1531376 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-10-11 18:03:27 +00:00
parent d69231cf8c
commit 96380e9129
2 changed files with 12 additions and 0 deletions

View File

@ -143,6 +143,9 @@ API Changes:
with IndexSearcher when an ExecutorService is specified. with IndexSearcher when an ExecutorService is specified.
(Ryan Ernst, Mike McCandless, Robert Muir) (Ryan Ernst, Mike McCandless, Robert Muir)
* LUCENE-5275: Change AttributeSource.toString() to display the current
state of attributes. (Robert Muir)
Optimizations Optimizations
* LUCENE-5225: The ToParentBlockJoinQuery only keeps tracks of the the child * LUCENE-5225: The ToParentBlockJoinQuery only keeps tracks of the the child

View File

@ -501,4 +501,13 @@ public class AttributeSource {
} }
} }
/**
* Returns a string consisting of the class's simple name, the hex representation of the identity hash code,
* and the current reflection of all attributes.
* @see #reflectAsString(boolean)
*/
@Override
public String toString() {
return getClass().getSimpleName() + '@' + Integer.toHexString(System.identityHashCode(this)) + " " + reflectAsString(false);
}
} }