mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
Revert "Exploit DiscoveryNode immutability..."
This reverts commit e76038e076bb66fd4deac62cd8f2ffd9d423cea6.
This commit is contained in:
parent
29278f8482
commit
4ff8f5c16c
@ -312,11 +312,8 @@ public class DiscoveryNode implements Writeable<DiscoveryNode>, ToXContent {
|
||||
return nodeId.hashCode();
|
||||
}
|
||||
|
||||
private String toString;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (toString == null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (nodeName.length() > 0) {
|
||||
sb.append('{').append(nodeName).append('}');
|
||||
@ -333,9 +330,7 @@ public class DiscoveryNode implements Writeable<DiscoveryNode>, ToXContent {
|
||||
if (!attributes.isEmpty()) {
|
||||
sb.append(attributes);
|
||||
}
|
||||
toString = sb.toString();
|
||||
}
|
||||
return toString;
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user