Tapestry
  1. Tapestry
  2. TAPESTRY-2476

Unhelpful exception messages when a null value is bound to a required parameter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.14
    • Component/s: Core Components
    • Labels:
      None
    • Environment:
      Windows XP Service Pack 2, FireFox 2.0.0.14, Eclipse 3.3.2, Maven 2.0.9, Run-Jetty-Run, Java 1.6.0_3

      Description

      Example exception:
      Render queue error in SetupRender[MainPage:tilesetsearch.palette]:
      org.apache.tapestry.ioc.internal.util.TapestryException

      Example tml line:
      <t:palette t:model="keywordModel" t:selected="selectedKeywordIds" t:encoder="longEncoder" t:size="5"/>

      Example stack trace: java.lang.NullPointerException

      • org.apache.tapestry.corelib.components...
        Palette.setupRender(Palette.java:379)
      • Palette.setupRender(Palette.java)
      • org.apache.tapestry.internal.structure...
        ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:478)
      • ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:880)
      • ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:54)
      • ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:482)
      • org.apache.tapestry.internal.services...
        RenderQueueImpl.run(RenderQueueImpl.java:63)
      • PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)

      This constitutes one example where the t:selected parameter was null. Later I got the same exception message with a different stack trace when the same parameter was null, but for a different reason.

      Perhaps required parameters should not only be bound, but also null checked.

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development