Skip to content

Fix jvm_version parsing of non-numeric version suffixes - #92

Merged
ctrueden merged 3 commits into
scijava:mainfrom
ncittm:fix-jvm-version
Aug 13, 2026
Merged

Fix jvm_version parsing of non-numeric version suffixes#92
ctrueden merged 3 commits into
scijava:mainfrom
ncittm:fix-jvm-version

Conversation

@ncittm

@ncittm ncittm commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

The old regex captured the entire quoted version string, including
non-numeric suffixes like "-internal" or "_312", which broke int()
conversion downstream. Now only the leading dot-separated digit
groups are captured.

Extract jvm_version parsing into a testable helper function.

Closes #91.

ncittm added 2 commits August 13, 2026 11:04
Split the version-string-to-tuple conversion out of jvm_version() into
_jvm_version_str_to_tuple() and add unit tests.
The old regex captured the entire quoted version string, including
non-numeric suffixes like "-internal" or "_312", which broke int()
conversion downstream. Now only the leading dot-separated digit
groups are captured.

These examples now work as expected:
* OpenJDK 11.0.9.1-internal -> (11, 0, 9, 1)
* OpenJDK 1.8.0_312 -> (1, 8, 0)
@ctrueden

Copy link
Copy Markdown
Member

Awesome—thanks @ncittm! ✨

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@ctrueden
ctrueden merged commit 50092cb into scijava:main Aug 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scyjava does not recognise Java version of openjdk=17.0.18 from conda-forge

2 participants