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 67693

Summary: Maybe useless ClassPathProvider in the EJB freeform project nature
Product: javaee Reporter: Andrei Badea <abadea>
Component: CodeAssignee: Pavel Buzek <pbuzek>
Status: RESOLVED WONTFIX    
Severity: blocker CC: pjiricka
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 66807    

Description Andrei Badea 2005-10-27 17:01:43 UTC
The EJB freeform project nature provides a ClassPathProvider (implemented in the
EJBModules class) whose findClassPath(FileObject fo) method returns either the
classpath of the EJB module which fo belongs to, or null if fo doesn't belong to
any EJB module in the respective project.

However, the Java nature provides a ClassPathProvider too, and the return values
of the two CPP's are merged (see
org.netbeans.modules.java.freeform.LookupMergerImpl) so that the first non-null
one is used. That is:

- either the Java CPP is used first and unless it returns null, the EJB CPP
isn't used at all
- or the EJB CPP is used first and its null returned value is ignored

It isn't clear what is the intention of the EJB freeform project's <classpath>
element and ClassPathProvider:

- if the intention is to exclude some of the Java sources from the classpath of
an EJB module, then it doesn't work (the Java CPP may be used first, or the null
return value of the EJB CPP is bypassed by the Java CPP). The implementation of
EJBModules.getSources() suggests this is the intention.

- if the intention is to add some sources (which aren't part of the project's
Java sources) to the classpath of an EJB module, then it does work (the null
return value of the Java CPP is bypassed by the EJB CPP).

Should probably be addressed together with issue 66807.
Comment 1 Petr Jiricka 2007-07-18 13:48:24 UTC
EJB freeform was dropped -> WONTFIX.