Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Exporting only subclass package
Exporting only subclass package [message #552129] Wed, 11 August 2010 00:54 Go to next message
Ben is currently offline BenFriend
Messages: 5
Registered: January 2010
Junior Member
I ran into an inconsistency between the eclipse OSGi runtime and tooling (PDE).
The scenario is:

bundle A
- defines classes:
service.internal.ServiceBase
service.Service
- exports package service
> Service extends ServiceBase, and ServiceBase implements method "invoke"

bundle B
- defines classes:
client.Client
- imports package service
> Client calls Service.invoke()

The PDE compiler reports an error, because "invoke" is not visible. However, if I change the compiler settings to ignore the access restriction and run the client, it can invoke the method successfully.

Is this simply a PDE bug, or is there more to it?

Is it a recommended practice to export only the subclass packages, given that it leaks internal methods?
Re: Exporting only subclass package [message #552250 is a reply to message #552129] Wed, 11 August 2010 12:54 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
This is actually a JDT bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=122915). In this case JDT has a different set of rules than OSGi runtime.
Previous Topic:Equinox Update from Install
Next Topic:Export-Package constraints problem
Goto Forum:
  


Current Time: Thu Apr 25 05:46:41 GMT 2024

Powered by FUDForum. Page generated in 0.03395 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top