GitHub user edorfaus opened a pull request:
https://github.com/apache/cxf/pull/237
Added tests for DefaultResourceManager, fixed a bug, and improved a comment
I noticed that my resource resolvers were sometimes called out of
(expected) order, which for me was significant.
I tracked it down to some code in JaxWsServerFactoryBean that creates a new
DefaultResourceManager with a copy of the resolvers from the original manager -
while the code in DefaultResourceManager for adding a list of resolvers adds
them in reverse order.
I think this is wrong, even if only due to the principle of least
astonishment, so went ahead and fixed it, after adding some tests that show the
problem (and also tests other parts of the class).
I also changed a comment on the ResourceManager interface that I thought
was rather unclear (resolving the seeming self-contradiction based on the
actual behavior of the code).
I'll note that this was only tested on top of the 3.1.x-fixes branch, since
I'm having trouble getting master to compile (even without any changes).
However, as far as I can tell only the whitespace is different in these files
between those versions. (If you want the 3.1.x version, there's a branch for it
in my fork on github.)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/edorfaus/cxf resource-resolver-tests
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cxf/pull/237.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #237
----
commit bb160c45f674f7cdca3c95e294424e54afc89e77
Author: Frode Austvik <[email protected]>
Date: 2017-02-17T01:47:36Z
Added tests for DefaultResourceManager, fixed a bug, and improved a comment.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---