Apache Lucene open-source search software
use the type String and do not clone explicitely (Strings are final and unmodifable)
Uwe Schindler59d358e68fba
diff --git a/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java b/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.javaindex 95d754994b4..d0d3540b6df 100644--- a/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java+++ b/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java@@ -69,6 +69,6 @@ public class TypeAttributeImpl extends AttributeImpl implements TypeAttribute, Cpublic void copyTo(AttributeImpl target) {TypeAttribute t = (TypeAttribute) target;- t.setType(new String(type));+ t.setType(type);}}