Description
Doing some tests over MyFaces Core, I found that if there is a declaration like this:
@ResourceDependency(name="test1.js")
@FacesComponent(createTag=true,
namespace="http://myfaces.apache.org/testComponent",
tagName="simpleComponentA", value="org.apache.myfaces.view.facelets.pool.UISimpleComponentA")
public class UISimpleComponentA extends UIComponentBase
It throws NullPointerException in Application.createComponent. The reason is in FaceletsCompilerSupport there are some lines that help us to get the default rendererType to use it later, but when the @ResourceDependency is found, it is added to the current view root, which is just wrong.
The solution is use a FacesContext wrapper and set a dummy UIViewRoot when this initialization step is done.