Skip to content

Commit

Permalink
Fix: _check_java_version for version below 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
Labbeti committed Feb 16, 2024
1 parent 524959d commit 522d721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aac_metrics/utils/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _check_java_version(version_str: str, min_major: int, max_major: int) -> boo

if version.major == 1 and version.minor <= 8:
# java <= 8 use versioning "1.MAJOR.MINOR" and > 8 use "MAJOR.MINOR.MICRO"
version_str = ".".join(map(str, (version.major, version.micro)))
version_str = ".".join(map(str, (version.minor, version.micro)))
version = Version(version_str)

return Version(f"{min_major}") <= version < Version(f"{max_major + 1}")

0 comments on commit 522d721

Please sign in to comment.