Groovy
  1. Groovy
  2. GROOVY-3219

NamespaceBuilder does not create child nodes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.7
    • Fix Version/s: 1.6-rc-2, 1.5.8, 1.7-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      NamespaceBuilder does not create child nodes

      	@Test
      	void testNamespaceBuilder() {
      
      		def n = new Namespace('http://foo/bar')
      		
      		def builder = new NamespaceBuilder(new NodeBuilder()).namespace(n.uri)
      		Node node = builder.crap(id:"3") {
      			bucket(name:"foo")
      		}
      		// ** this prints out only the "crap" element, not its child
      		new XmlNodePrinter().print(node)
      
      		// *** fails
      		assert node[n.bucket][0].@name == 'foo'
      
      	}
      

      If I'm not missing something here then the bug is in NamespaceBuidlerSupport (it doesn't do anything with the BuilderSupport instance that you pass into the constructor).

        Activity

        Dave Syer created issue -
        Paul King made changes -
        Field Original Value New Value
        Assignee Paul King [ paulk_asert ]
        Paul King made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 1.6 [ 13832 ]
        Fix Version/s 1.7-beta-1 [ 14014 ]
        Fix Version/s 1.5.8 [ 14630 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12732216 ] Default workflow, editable Closed status [ 12743891 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12973981 ] Default workflow, editable Closed status [ 12981103 ]
        Mark Thomas made changes -
        Assignee paulk_asert [ paulk_asert ] Paul King [ paulk ]

          People

          • Assignee:
            Paul King
            Reporter:
            Dave Syer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development