You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However when attempting to parse Java's own version information the following exception is raised.
Caused by: Unexpected character 'ILLEGAL(_)' at position '5', expecting '[HYPHEN, PLUS, EOI]'
at com.github.zafarkhaja.semver.VersionParser.consumeNextCharacter(VersionParser.java:516)
at com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:259)
at com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:195)
at com.github.zafarkhaja.semver.Version.valueOf(Version.java:265)
I've tried replacing the underscore with a period and it raises a similar error: Unexpected character 'DOT(.)' at position '5', expecting '[HYPHEN, PLUS, EOI]'
This seems like the most basic use-case inspired by a very simple Oracle version parsing. Am I using the library wrong, or is Oracle's own format not supported by this library?
The use-case is to test for a specific update level inside Java (e.g. u121 vs u141).
The text was updated successfully, but these errors were encountered:
Closing this out since turning Java's version string into a valid SemVer will fix it.
The following snippet will fix Java version parsing...
This will turn 1.8.0_42 to 1.8.0-42 and fix the parsing error...
- Version v = Version.valueOf(System.getProperty("java.version"));+ Version v = Version.valueOf(System.getProperty("java.version").replaceFirst("_", "-"));
Java's own internal version scheme is:
1.8.0_121
However when attempting to parse Java's own version information the following exception is raised.
I've tried replacing the underscore with a period and it raises a similar error:
Unexpected character 'DOT(.)' at position '5', expecting '[HYPHEN, PLUS, EOI]'
This seems like the most basic use-case inspired by a very simple Oracle version parsing. Am I using the library wrong, or is Oracle's own format not supported by this library?
The use-case is to test for a specific update level inside Java (e.g.
u121
vsu141
).The text was updated successfully, but these errors were encountered: