Bug 478606 - Replace uses of PackageAdmin.getBundles with BundleContext.getBundles
Summary: Replace uses of PackageAdmin.getBundles with BundleContext.getBundles
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Alex Blewitt CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2015-09-29 04:43 EDT by Alex Blewitt CLA
Modified: 2020-06-18 10:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Blewitt CLA 2015-09-29 04:43:35 EDT
The PackageAdmin service is deprecated and most uses of this are either:

* Getting the bundle context for a particular class (replacement: FrameworkUtil)
* Getting a list of installed bundles (replacement: BundleContext.getBundles())
* Looking up a class from a bundle (replacement: Bundle.loadClass)

The use of PackageAdmin is encouraging the use of @SuppressWarning("deprecation") which may be hiding other errors.
Comment 1 Lars Vogel CLA 2015-09-29 04:48:52 EDT
+1
Comment 2 Alex Blewitt CLA 2015-09-29 04:57:19 EDT
(Oh, and tests which call refreshPackages() - these may be replaceable by FrameworkWiring.refreshBundles instead.)
Comment 3 Alex Blewitt CLA 2015-10-06 12:57:01 EDT
No plans for me to work on this at the moment, re-assigning to inbox.
Comment 4 Lars Vogel CLA 2016-04-20 12:06:02 EDT
Mass move to 4.7 as M7 is approaching. Please move back in case you are planning to fix it for Neon.
Comment 5 Dani Megert CLA 2018-05-24 12:54:34 EDT
Removing target milestone for all bugs that are not major or above.
Comment 6 Dani Megert CLA 2018-05-25 04:06:42 EDT
> Removing target milestone for all bugs that are not major or above.

Of course I meant "major or below".

Sorry for the noise!
Comment 7 Lars Vogel CLA 2020-06-18 06:36:13 EDT
Alex, something for you?