Tapestry 5
  1. Tapestry 5
  2. TAP5-636

Using Element.forceAttribute() with a null value can cause a later NPE during rendering under some circumstances

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.3
    • Fix Version/s: 5.1.0.3
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      An unexpected application exception has occurred.

      • java.lang.NullPointerException
      • org.apache.tapestry5.dom.AbstractMarkupModel.encodeQuoted(AbstractMarkupModel.java:94)
      • org.apache.tapestry5.dom.Attribute.render(Attribute.java:69)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:313)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
      • org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
      • org.apache.tapestry5.dom.Document.toMarkup(Document.java:163)
      • org.apache.tapestry5.dom.Node.toMarkup(Node.java:80)
      • org.apache.tapestry5.internal.services.MarkupWriterImpl.toMarkup(MarkupWriterImpl.java:57)
      • org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
      • $PageResponseRenderer_12085541484.renderPageResponse($PageResponseRenderer_12085541484.java)

      The real question is: how can the value ever be null? Adding an attribute that's null, or overriding an attribute to null, should remove it from the list.

        Activity

        Howard M. Lewis Ship created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Summary NPE inside Attribute.write() if value is null Using Element.forceAttribute() with a null value can cause a later NPE during rendering under some circumstances
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.1.0.3 [ 12313782 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development