diff --git a/version/src/main/java/io/smallrye/common/version/AbstractVersionIterator.java b/version/src/main/java/io/smallrye/common/version/AbstractVersionIterator.java index fde8f98..025c9ab 100644 --- a/version/src/main/java/io/smallrye/common/version/AbstractVersionIterator.java +++ b/version/src/main/java/io/smallrye/common/version/AbstractVersionIterator.java @@ -585,4 +585,12 @@ public void next() throws NoSuchElementException, VersionSyntaxException { assert end >= start; this.cookie = makeCookie(start, end, token, bits); } + + public String toString() { + StringBuilder b = new StringBuilder(string); + b.insert(getEndIndex(), ">"); + b.insert(getStartIndex(), "<"); + b.append(' ').append(currentType()); + return b.toString(); + } }