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

Summary: Netigso.fakeBundle skips modules without public packages
Product: platform Reporter: Jesse Glick <jglick>
Component: NetigsoAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P4    
Version: 7.0   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 198248    

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.