Spring Web Flow
  1. Spring Web Flow
  2. SWF-918

AjaxTilesView throws Null Pointer Exception if <definition> tag is empty

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.5
    • Component/s: JavaScript
    • Labels:
      None

      Description

      If the tiles definition contains <definition> tags that are empty a null pointer exception is thrown

      <definition name="defaultPageLayout" template="/WEB-INF/jsp/defaultPageLayout.jsp">
      <put-attribute name="header" value="/WEB-INF/jsp/fragments/header.jsp"/>
      <put-attribute name="leftColumn" value="leftColumn"/>
      <put-attribute name="footer" value="/WEB-INF/jsp/fragments/footer.jsp"/>
      </definition>

      <definition name="leftColumn" template="/WEB-INF/jsp/fragments/leftColumn.jsp">
      <!-- I should not be empty -->
      </definition>

      java.lang.NullPointerException
      at org.springframework.js.ajax.tiles2.AjaxTilesView.flattenAttributeMap(AjaxTilesView.java:116)
      at org.springframework.js.ajax.tiles2.AjaxTilesView.flattenAttributeMap(AjaxTilesView.java:123)
      at org.springframework.js.ajax.tiles2.AjaxTilesView.renderMergedOutputModel(AjaxTilesView.java:91)
      at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:258)

      Code fragment that caused the exception:
      Iterator i = compositeDefinition.getAttributes().keySet().iterator();

        Activity

        Hide
        Scott Andrews added a comment -

        This may have been fixed in 2.0.4 regarding SWF-916

        Show
        Scott Andrews added a comment - This may have been fixed in 2.0.4 regarding SWF-916
        Hide
        Alex Marshall added a comment -

        I'm getting this error in 2.0.5. Could this have regressed ?

        Show
        Alex Marshall added a comment - I'm getting this error in 2.0.5. Could this have regressed ?

          People

          • Assignee:
            Scott Andrews
            Reporter:
            Christian Stangier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5m
              5m
              Remaining:
              Remaining Estimate - 5m
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development