title: java.lang.NullPointerException: at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.getAttributeValue
body: <p>I'm trying to use the new passthrough attribute feature in my web application, however i'm having problems with nullable attributes. This is the code:</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
  
  "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui" 
        xmlns:util="http://xmlns.jcp.org/jsf/composite/util"
        xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
        xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"&gt;
  ...
  &lt;p:outputPanel  pt:example="#{mybean.nullableAttribute}"  &gt;
  ...
  &lt;/p:outputPanel&gt;
  </code></pre>
  
  <p>I'm getting the exception:</p>
  
  <pre><code>ERROR  javax.enterprise.resource.webcontainer.jsf.application 12:01:09.205 [http-listener-1(3)]  - Error Rendering View[/index.xhtml]
  java.lang.NullPointerException: null
      at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.getAttributeValue(HtmlResponseWriter.java:1215) ~[javax.faces-2.2.6.jar:2.2.6]
      at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.flushAttributes(HtmlResponseWriter.java:1175) ~[javax.faces-2.2.6.jar:2.2.6]
      at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.closeStartIfNecessary(HtmlResponseWriter.java:1117) ~[javax.faces-2.2.6.jar:2.2.6]
      at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startElement(HtmlResponseWriter.java:646) ~[javax.faces-2.2.6.jar:2.2.6]
      at org.primefaces.component.growl.GrowlRenderer.encodeEnd(GrowlRenderer.java:38) ~[primefaces-4.0.jar:4.0]
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) ~[javax.faces-2.2.6.jar:2.2.6]
      at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:74) ~[primefaces-4.0.jar:4.0]
      at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:57) ~[primefaces-4.0.jar:4.0]
      at org.primefaces.component.outputpanel.OutputPanelRenderer.encodeMarkup(OutputPanelRenderer.java:64) ~[primefaces-4.0.jar:4.0]
      at org.primefaces.component.outputpanel.OutputPanelRenderer.encodeEnd(OutputPanelRenderer.java:40) ~[primefaces-4.0.jar:4.0]
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) ~[javax.faces-2.2.6.jar:2.2.6]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1864) ~[javax.faces-2.2.6.jar:2.2.6]
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) ~[javax.faces-2.2.6.jar:2.2.6]
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) ~[javax.faces-2.2.6.jar:2.2.6]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1857) ~[javax.faces-2.2.6.jar:2.2.6]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860) ~[javax.faces-2.2.6.jar:2.2.6]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860) ~[javax.faces-2.2.6.jar:2.2.6]
  </code></pre>
  
  <p>When the attribute is null. It does work when it's not null. I have tried with mojarra 2.2.0 and 2.2.6 (I'm on glassfish 4.0)</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>