getAttributes().get("attributeName") in UIComponent constructor returns null
<p>I am testing JSF component but I am getting NullPointerException :( The problem code is : </p>

<pre><code>@FacesComponent(value="mycomponent0")
public class MyComponent extends HtmlPanelGroup{

MyComponent(){
   String a0=this.getAttributes().get("attr0");
}

}
</code></pre>

<p>the taglib.xml's tag contains the attr0 attribute and the tags usage is : </p>

<pre><code>&lt;abc:mycomponent attr0="helloworld"&gt;&lt;/abc:mycomponent&gt;
</code></pre>

<p>So my question is what causes the issue and how to handle it?</p>

<p>Thanks</p>