We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-alpha, -beta, -rc, -preview, -SNAPSHOT should never be displayed or handled as latest version. They are not stable.
Sample:
Please skip these versions in function findLatestVersion.
Sample code:
private String findLatestVersion(JSONArray versions) { if (versions.length() < 1) { return null; } ComparableVersion latestVersion = null; for (int i = 0; i < versions.length(); i++) { String version = versions.getString(i); if (version == null || version.trim().length() == 0 || version.trim().toLowerCase().contains("-alfa") || version.trim().toLowerCase().contains("-alpha") || version.trim().toLowerCase().contains("-beta") || version.trim().toLowerCase().contains("-snapshot") || version.trim().toLowerCase().contains("-rc") || version.trim().toLowerCase().contains("-preview")) { continue; } ComparableVersion comparableVersion = new ComparableVersion(version); if (latestVersion == null) { latestVersion = comparableVersion; } else if (comparableVersion.compareTo(latestVersion) > 0) { latestVersion = comparableVersion; } } if (latestVersion == null) { return null; } return latestVersion.toString(); }
4.10.1
Executable WAR
Microsoft SQL Server
No response
Microsoft Edge
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current Behavior
-alpha, -beta, -rc, -preview, -SNAPSHOT should never be displayed or handled as latest version. They are not stable.
Sample:
Steps to Reproduce
Expected Behavior
Please skip these versions in function findLatestVersion.
Sample code:
Dependency-Track Version
4.10.1
Dependency-Track Distribution
Executable WAR
Database Server
Microsoft SQL Server
Database Server Version
No response
Browser
Microsoft Edge
Checklist
The text was updated successfully, but these errors were encountered: