Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369952 - [DS] Consider using ACC of bundle when getting/registering services
Summary: [DS] Consider using ACC of bundle when getting/registering services
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: 3.8.0 Juno   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.compendium-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 10:48 EST by Thomas Watson CLA
Modified: 2019-10-30 14:14 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2012-01-27 10:48:00 EST
see bug369689 for details.  In OSGi R5 you can obtain the ACC by adapting the component bundle to:

AccessControlContext componentACC = 
      componentBundle.adapt(AccessControlContext.class);

I suggest that instead of the suggestion in bug369689 comment9 since DS does not require the class actually comes from the component bundle.  But this does tie the implementation to an R5 implementation.  You could fall back to calling bundle.hasPermission if the adapt method returns null for the ACC.
Comment 1 BJ Hargrave CLA 2012-01-27 11:02:35 EST
(In reply to comment #0)
> But this does
> tie the implementation to an R5 implementation.  

And using Bundle.adapt ties it to 4.3 :-)

I think this bug request is a good idea.
Comment 2 Eclipse Genie CLA 2019-10-30 12:33:56 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.