This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 198345 - Netigso.fakeBundle skips modules without public packages
Summary: Netigso.fakeBundle skips modules without public packages
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Netigso (show other bugs)
Version: 7.0
Hardware: PC Linux
: P4 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks: 198248
  Show dependency tree
 
Reported: 2011-05-05 12:53 UTC by Jesse Glick
Modified: 2011-06-16 06:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-05-05 12:53:20 UTC
if ("-".equals(exp)) {
            return null;
        }

Does this mean that modules with no public packages are simply not loaded by the OSGi container at all, perhaps as a performance optimization? If true, then modules providing just services (e.g. an Eclipse plugin.xml) will be invisible to the OSGi framework, unless they are packaged as bundles rather than NB modules.

Also the following:

        man.getMainAttributes().putValue("Export-Package", m.getCodeNameBase());

looks like nonsense. It is deprecated to not specify OpenIDE-Module-Public-Packages at all, so we do not really need to support that. The code should probably read:

        if (exp != null && !exp.equals("-")) {
            ...set Export-Package as now...
        }
Comment 1 Jaroslav Tulach 2011-05-07 14:55:41 UTC
The reasoning is like this: There is no reason why an OSGi should want to depend on a module without public packages (OSGi does not support implementation dependencies). Thus there is no reason to export modules without public packages.

I verify the problem with man.getMainAttributes().putValue("Export-Package",
m.getCodeNameBase().
Comment 2 Jesse Glick 2011-05-10 19:08:58 UTC
(In reply to comment #1)
> There is no reason why an OSGi [bundle?] should want to
> depend on a module without public packages

Right, it cannot. But the app might expect that such a module is nonetheless loaded by the OSGi framework and activated, which would make an observable difference in case there is some system such as the Eclipse plugin.xml scanner which pays attention to the list of activated bundles (and changes therein).
Comment 3 Jaroslav Tulach 2011-06-16 06:40:26 UTC
We will fix the problem as soon as it really demonstrates itself.