Exporting only subclass package [message #552129] |
Tue, 10 August 2010 20:54  |
Eclipse User |
|
|
|
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?
|
|
|
|
Powered by
FUDForum. Page generated in 0.05062 seconds