From 067b8379d50a894dbd91d2041cae8548b4059a85 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sun, 17 Apr 2011 01:45:02 +0300 Subject: [PATCH] internal cluster name --- .../main/java/org/elasticsearch/cluster/ClusterName.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/ClusterName.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/ClusterName.java index e2f3e81b39c..1cdd45a4c98 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/ClusterName.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/ClusterName.java @@ -33,7 +33,7 @@ public class ClusterName implements Streamable { public static final String SETTING = "cluster.name"; - public static final ClusterName DEFAULT = new ClusterName("elasticsearch"); + public static final ClusterName DEFAULT = new ClusterName("elasticsearch".intern()); private String value; @@ -46,7 +46,7 @@ public class ClusterName implements Streamable { } public ClusterName(String value) { - this.value = value; + this.value = value.intern(); } public String value() { @@ -60,7 +60,7 @@ public class ClusterName implements Streamable { } @Override public void readFrom(StreamInput in) throws IOException { - value = in.readUTF(); + value = in.readUTF().intern(); } @Override public void writeTo(StreamOutput out) throws IOException {