diff options
author | gjoranv <gv@oath.com> | 2018-09-29 00:25:25 +0200 |
---|---|---|
committer | gjoranv <gv@oath.com> | 2019-01-21 15:09:23 +0100 |
commit | 7f754708f8441ff0095a841356756351c6b0e0ac (patch) | |
tree | ddb36631a6e77b24d74f6a523f8550a563a492f6 /jdisc_core | |
parent | 6b57575ed493e1017eec32caff3d260c00fda8b4 (diff) |
Retrieve the ServiceReference via the service's own bundle.
- Going via the framework/bundleContext does not work, because
it's class is loaded by the AppClassLoader, which will then be
used to lookup the service class. Since this is a unit test,
the class will be found on the class path but, since it's a
different class than the service class in the bundle, a class
cast check will fail, and the returned service ref will be null.
- Note that this worked on Felix <6.0 because an exception was
thrown (because the framework bundle does not export our service
class), which led to the class cast check being skipped
altogether.
See felix/framework:ExtensionManager.getClassByDelegation
(commit 3c147cb58a5)
Diffstat (limited to 'jdisc_core')
0 files changed, 0 insertions, 0 deletions