From 97f0e98c3a7c379f89694666f93d325e761b4530 Mon Sep 17 00:00:00 2001 From: Craig Taverner Date: Wed, 7 Sep 2022 11:22:27 +0200 Subject: [PATCH] Trivial code cleanup (#88505) --- .../elasticsearch/xpack/core/common/stats/EnumCounters.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/stats/EnumCounters.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/stats/EnumCounters.java index 98f66ab4587a5..4a444a1ba02d6 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/stats/EnumCounters.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/stats/EnumCounters.java @@ -118,11 +118,11 @@ public String toString() { StringBuilder buf = new StringBuilder("["); boolean first = true; for (E e : enums) { - buf.append(e.name().toLowerCase(Locale.ROOT)).append(": ").append(get(e)); - if (first) { + if (first == false) { buf.append(", "); - first = false; } + first = false; + buf.append(e.name().toLowerCase(Locale.ROOT)).append(": ").append(get(e)); } buf.append("]"); return buf.toString();