groovy
  1. groovy
  2. GROOVY-3219

NamespaceBuilder does not create child nodes

    Details

    • Type: Bug Bug
    • Status: Closed 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
    • Number of attachments :
      0

      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

        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.7-beta-1 [ 14014 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.6 [ 13832 ]
        Fix Version/s 1.5.8 [ 14630 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: