Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr 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.java
index 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, C
public void copyTo(AttributeImpl target) {
TypeAttribute t = (TypeAttribute) target;
- t.setType(new String(type));
+ t.setType(type);
}
}