-
Notifications
You must be signed in to change notification settings - Fork 208
feat(projects): Improve project relationship iteration with VersionComparator #2963
New issue
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
base: main
Are you sure you want to change the base?
feat(projects): Improve project relationship iteration with VersionComparator #2963
Conversation
backend/common/src/main/java/org/eclipse/sw360/common/utils/VersionComparator.java
Show resolved
Hide resolved
backend/common/src/main/java/org/eclipse/sw360/common/utils/VersionComparator.java
Outdated
Show resolved
Hide resolved
001a785 to
0c40917
Compare
GMishx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small change is still required.
backend/common/src/main/java/org/eclipse/sw360/common/utils/VersionComparator.java
Outdated
Show resolved
Hide resolved
2bf2048 to
a414daa
Compare
|
@GMishx can you check now |
backend/common/src/main/java/org/eclipse/sw360/common/utils/VersionComparator.java
Outdated
Show resolved
Hide resolved
|
Why This Works If part = "43-2+deb8u2", numericPrefix = "43", which can be parsed safely. If part has no numeric prefix (e.g., "deb8u2"), it gets a default -1 for lower priority. It ensures that versions like "3.16.43-2+deb8u2" are still sorted meaningfully. |
|
@GMishx can you check now |
backend/common/src/main/java/org/eclipse/sw360/common/utils/VersionComparator.java
Outdated
Show resolved
Hide resolved
|
@GMishx should I also optimise for version with aplha or beta |
I agree but current solution works for cases like Will work for the Debian version strings. But would say The solution should be generic enough. |
|
@GMishx I have also added for |
GMishx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@shi9qiu can you please help test / review this branch. |
Issue: #236
Suggest Reviewer
How To Test?
Checklist
Must: