You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/10/11 20:23:53 UTC
svn commit: r1531381 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/CHANGES.txt lucene/core/
lucene/core/src/java/org/apache/lucene/util/AttributeSource.java
Author: rmuir
Date: Fri Oct 11 18:23:53 2013
New Revision: 1531381
URL: http://svn.apache.org/r1531381
Log:
LUCENE-5275: Change AttributeSource.toString to display the current state of attributes
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_4x/lucene/core/ (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java
Modified: lucene/dev/branches/branch_4x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/CHANGES.txt?rev=1531381&r1=1531380&r2=1531381&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/lucene/CHANGES.txt Fri Oct 11 18:23:53 2013
@@ -90,6 +90,9 @@ API Changes:
with IndexSearcher when an ExecutorService is specified.
(Ryan Ernst, Mike McCandless, Robert Muir)
+* LUCENE-5275: Change AttributeSource.toString() to display the current
+ state of attributes. (Robert Muir)
+
Optimizations
* LUCENE-5225: The ToParentBlockJoinQuery only keeps tracks of the the child
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java?rev=1531381&r1=1531380&r2=1531381&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java Fri Oct 11 18:23:53 2013
@@ -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);
+ }
}