You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Karl Pauls (Jira)" <ji...@apache.org> on 2021/12/21 23:13:00 UTC
[jira] [Created] (FELIX-6488) Optimize ServiceReference.isAssignableTo
Karl Pauls created FELIX-6488:
---------------------------------
Summary: Optimize ServiceReference.isAssignableTo
Key: FELIX-6488
URL: https://issues.apache.org/jira/browse/FELIX-6488
Project: Felix
Issue Type: Improvement
Components: Framework
Affects Versions: framework-7.0.3
Reporter: Karl Pauls
Assignee: Karl Pauls
Fix For: framework-7.0.4
The ServiceReference.isAssignableTo(Bundle bundle, String className) does some complicated check to see if the service is assignable. This includes trying to load classes and catching CNFE to see if providers and/or requesters have access to the given class.
As that is done quite a bit (it is used in service event dispatching and service lookup) it would be good to optimize this to either not throw CNFE during the lookup or maybe at least cache the results to not have them be done all the time.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)