Fix sorting when using a TreePathViewerSorter in AbstractTreeViewer#3901
Conversation
|
@akurtakov I tested this change locally with the affected LSP4E version and the test passed again when using CommonViewerSorter. |
|
The baseline errors look kind of bogus and seem to be related to signed versus unsigned. |
|
Looks good to me but I'll not merge it now to give sometime for the verification issue to be investigated. |
|
Is this PR based on master? @laeubi suggested this signing problem looks like one caused by being out of sync with master. Or maybe @HannesWell made build changes. Something is obviously fishy here... |
Not explicitly, but that it only affects tests is noticeable. Maybe it's because of the recent removal of tests from the p2 repository. But as far as I know artifacts missing in the baseline are ignored. |
Since this happens in almost all repositories I've created a dedicated issue for that now: |
|
Nit: the switch with an unreachable default -> throw new IllegalStateException() is awkward. The sibling method internalCompare at |
b49305e to
6cc4385
Compare
|
Thanks @vogella for taking a look. I adjusted the code accordingly. I also added tests to make sure both cases work as expected. |
6cc4385 to
9ea0a5e
Compare
Fixes #3900
I tried to minimize code duplication by making the outer if clause include both cases and then checking for the actual type again