diff --git a/src/io/routekit/ConstToken.java b/src/io/routekit/ConstToken.java index c93c5f4..e9fc0f0 100644 --- a/src/io/routekit/ConstToken.java +++ b/src/io/routekit/ConstToken.java @@ -28,7 +28,7 @@ public CharBuffer buffer() { @Override public String toString() { - return "ConstToken[" + token + "]"; + return "ConstToken[%s]".formatted(token); } @Override diff --git a/src/io/routekit/SeparableVariableToken.java b/src/io/routekit/SeparableVariableToken.java index 81cae0d..6915bdc 100644 --- a/src/io/routekit/SeparableVariableToken.java +++ b/src/io/routekit/SeparableVariableToken.java @@ -21,6 +21,6 @@ public int match(CharBuffer buffer) { @Override public String toString() { - return "SeparableVariableToken[" + name() + "]"; + return "SeparableVariableToken[%s]".formatted(name()); } } diff --git a/src/io/routekit/WildcardToken.java b/src/io/routekit/WildcardToken.java index e7cd9a2..bd7dc4b 100644 --- a/src/io/routekit/WildcardToken.java +++ b/src/io/routekit/WildcardToken.java @@ -14,6 +14,6 @@ public int match(CharBuffer buffer) { @Override public String toString() { - return "WildcardToken[" + name() + "]"; + return "WildcardToken[%s]".formatted(name()); } }