Simplify HttpStatusCode.toString()
[netconf.git] / protocol / restconf-api / src / main / java / org / opendaylight / restconf / api / HttpStatusCode.java
index 3cc08840a7b685d48ed1892cf2e45a377d7bbe32..28a2c98f3563b1d0e2493612dc1a96c6e886644e 100644 (file)
@@ -256,10 +256,6 @@ public final class HttpStatusCode {
 
     @Override
     public String toString() {
-        final var sb = new StringBuilder(HttpStatusCode.class.getSimpleName()).append('(').append(code);
-        if (phrase != null) {
-            sb.append(' ').append(phrase);
-        }
-        return sb.append(')').toString();
+        return phrase == null ? Integer.toString(code) : code + " " + phrase;
     }
 }