#176992 - No guarantee that facelets descriptors in jsf-impl.jar added to a web project as a library will be used in favour of the glassfish's jsf-impl.jar

Marek Fukala <[email protected]>
Newsgroups gmane.comp.java.netbeans.reviewers
Message-ID <[email protected]>
https://netbeans.org/bugzilla/show_bug.cgi?id=176992

Description:
If one adds its own implementation of jsf 2.0 to a web project as a 
library, in
runtime the classes are loaded from this jar instead of the default
implementation which comes with the webserver. One would expect that the 
code
completion and other jsf editor features would reflect this as well.

However, this is not true, since if there is more facelets libraries
descriptors for one library found on the compile classpath, one of them 
will be
choosen in an undefined way.

This may break the case when one upgrades the mojarra jars by putting 
freshest
binaries to the web project as a libraries. The jsf editor support may 
not use
the descriptors from these newer files.


Impact:
JSF code completion offers incorrect items and error checks works 
according to
incorrect descriptor so some false alarms may appear

Fix:
Properly sort the library descriptor sources before processing so the 
files from
the beginning of the classpath are processed first and any other 
subsequent identical
descriptors are ignored.

Changeset:
http://hg.netbeans.org/web-main/rev/7558dcf47fe0

Thanks for the review,
Marek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.