dblevins commented on pull request #779:
URL: https://github.com/apache/cxf/pull/779#issuecomment-827838166
I think we should hit the merge button on this.
I've found other issues with our sorting and am in the process of writing
very simple test cases and creating fixes. I don't want to get too far in that
process, however, as it's just going to create merge conflicts with this PR.
As mentioned, I'm already working on a fix, but there's an example of a test
case I have that fails with the current sorting:
```
@Test
public void mostSpecificClassTypeWins() {
class Shape {
}
class Square extends Shape {
}
class ShapeReader extends Reader<Shape> {
}
class SquareReader extends Reader<Square> {
}
class ObjectReader extends Reader<Object> {
}
final List<ProviderInfo<MessageBodyReader<?>>> providers =
Providers.readers()
.system(new ShapeReader())
.system(new SquareReader())
.system(new ObjectReader())
.get();
assertOrder(providers, "SquareReader\n"
+ "ShapeReader\n"
+ "ObjectReader");
}
```
With the current code, we're actually sorting in the reverse preferred
order: `ObjectReader`, `ShapeReader`, `ObjectReader`
Very easy fix, just don't want to get too far with pending PRs on the
sorting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]