groovy

MarkupBuilder throws NPE if element content or attribute values are null

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta-1
  • Fix Version/s: 1.5.2
  • Component/s: XML Processing
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    1

Description

def b = new MarkupBuilder()
b.bug(){
element(null)
}

The above code fragment throws an NPE, as does:

def b = new MarkupBuilder()
b.bug(){
element(t1:null)
}

Activity

Hide
Peter Ledbrook added a comment -

Patch to MarkupBuilder and its unit test.

Show
Peter Ledbrook added a comment - Patch to MarkupBuilder and its unit test.
Hide
Paul King added a comment -

Added. Thanks for the patch.

Show
Paul King added a comment - Added. Thanks for the patch.
Hide
Paul King added a comment -

close off release 1.5.4

Show
Paul King added a comment - close off release 1.5.4

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: