File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
server/src/main/java/org/elasticsearch Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ public ClusterName(StreamInput input) throws IOException {
39
39
}
40
40
41
41
public ClusterName (String value ) {
42
- this .value = value .intern ();
42
+ // cluster name string is most likely part of a setting so we can speed things up over outright interning here
43
+ this .value = Settings .internKeyOrValue (value );
43
44
}
44
45
45
46
public String value () {
Original file line number Diff line number Diff line change @@ -1567,7 +1567,7 @@ private static String toString(Object o) {
1567
1567
* @param s string to intern
1568
1568
* @return interned string
1569
1569
*/
1570
- static String internKeyOrValue (String s ) {
1570
+ public static String internKeyOrValue (String s ) {
1571
1571
return settingLiteralDeduplicator .deduplicate (s );
1572
1572
}
1573
1573
You can’t perform that action at this time.
0 commit comments