mirror of
https://github.com/semver/semver.git
synced 2026-07-10 19:50:47 -05:00
[GH-ISSUE #383] NumberFormatException when pharsing versions like 2.8.1414098270477 & 0.0.111111111111 #7259
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @itay-keller on GitHub (Jul 11, 2017).
Original GitHub issue: https://github.com/semver/semver/issues/383
Hi,
Where semver is trying to pharse versions like it gets a NumberFormatException:
2.8.1414098270477
@msitte commented on GitHub (Jul 11, 2017):
your number is too long for an int. you'd have to use long instead: java.lang.Long.parseLong
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
@itay-keller commented on GitHub (Jul 11, 2017):
These are not my version numbers, but versions I stumbled upon when using semver.
Maybe semver can change parseVersionCore to use long instead of int.
@FichteFoll commented on GitHub (Jul 11, 2017):
You are referring to a specific implementation of semver, while this repo is about the specification. Semver does not impose a maximum number for its parts (e.g int or long), however there is an issue discussing this. I'm on mobile rn, but it shouldn't be hard to find.
@jwdonahue commented on GitHub (Nov 28, 2017):
@itay-keller, the most likely repo's that house the code you referenced can be found here:
https://github.com/search?utf8=%E2%9C%93&q=zafarkhaja&type=
Please close this issue.