From c9a46978e1cfac35a92600523d39bc7e9261ed78 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sat, 5 Jul 2014 19:31:23 +0200 Subject: [PATCH] Remove intern calls on FieldMapper#Names remove internal callas on FieldMappers#Names, we properly reuse FieldMapper, so there is no need to try and call intern in order to reuse the names. This can be heavy with many fields and continuous mapping parsing. closes #6747 --- .../org/elasticsearch/index/mapper/FieldMapper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/elasticsearch/index/mapper/FieldMapper.java b/src/main/java/org/elasticsearch/index/mapper/FieldMapper.java index b7909752ed9..942222db5b8 100644 --- a/src/main/java/org/elasticsearch/index/mapper/FieldMapper.java +++ b/src/main/java/org/elasticsearch/index/mapper/FieldMapper.java @@ -66,11 +66,11 @@ public interface FieldMapper extends Mapper { } public Names(String name, String indexName, String indexNameClean, String fullName, @Nullable String sourcePath) { - this.name = name.intern(); - this.indexName = indexName.intern(); - this.indexNameClean = indexNameClean.intern(); - this.fullName = fullName.intern(); - this.sourcePath = sourcePath == null ? this.fullName : sourcePath.intern(); + this.name = name; + this.indexName = indexName; + this.indexNameClean = indexNameClean; + this.fullName = fullName; + this.sourcePath = sourcePath == null ? this.fullName : sourcePath; } /**