Why is there a preceding 0 in the "patch" version reported by `-version` flag?

0 votes
asked Feb 2 in Question / help by karfau (120 points)
When calling `java -jar plantuml-1.2021.1.jar -version` it reports `1.2021.01` but the java version of the library is `1.2021.1`.

What is this additional `0` good for?

(The previous version reported `1.2021.0`, and most likely the 11th version this year will again report `1.2021.10`, as the later versions last year did.)

This makes it harder to compare expected versions in an integration test, e.g.

https://github.com/karfau/plantuml-docker/pull/25/commits/d05fd6b0f01b746229aa6a1c3f0993164f684e6c

Could it be removed?
commented Feb 3 by Serge Wenger Work (13,820 points)
Hello,

If you sort versions as strings, the order is not correct if you have different digits count:

1.2021.0
1.2021.1
1.2021.10
1.2021.2

If you use 2 digits
1.2021.0
1.2021.01
1.2021.02
1.2021.10

1 Answer

0 votes
answered Feb 5 by plantuml (244,880 points)
Yes, it's difficult to know which is the best...

Both have pros and cons...

However, I am wondering if we are not going to switch and remove this "additional" 0.

So, as test, we have changed -version behavior on last beta http://beta.plantuml.net/plantuml.jar

@Serge: tell us if it's an issue for you.
commented Feb 5 by Serge Wenger Work (13,820 points)
I prefer with additional 0, but it's not a problem for me.
...