You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/05/16 10:12:52 UTC
[groovy] 25/25: GROOVY-8647: Split package renaming (groovy-xml)
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit d250f8a1ef7eaad41b8e84d5a01b7cbd508a21b6
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu May 16 20:12:15 2019 +1000
GROOVY-8647: Split package renaming (groovy-xml)
---
.../src/main/java/groovy/util/XmlNodePrinter.java | 2 +
.../src/main/java/groovy/util/XmlParser.java | 3 +
.../src/main/java/groovy/util/XmlSlurper.java | 2 +
.../src/main/java/groovy/util/XmlUtil.java | 78 ++++++++++++++++++++++
.../java/groovy/util/slurpersupport/Attribute.java | 1 +
.../groovy/util/slurpersupport/Attributes.java | 1 +
.../util/slurpersupport/FilteredAttributes.java | 4 +-
.../util/slurpersupport/FilteredNodeChildren.java | 1 +
.../groovy/util/slurpersupport/GPathResult.java | 1 +
.../util/slurpersupport/NamespaceAwareHashMap.java | 1 +
.../groovy/util/slurpersupport/NoChildren.java | 1 +
.../main/java/groovy/util/slurpersupport/Node.java | 1 +
.../java/groovy/util/slurpersupport/NodeChild.java | 1 +
.../groovy/util/slurpersupport/NodeChildren.java | 1 +
.../groovy/util/slurpersupport/NodeIterator.java | 1 +
.../groovy/util/slurpersupport/NodeParents.java | 1 +
.../util/slurpersupport/ReplacementNode.java | 1 +
.../src/main/java/groovy/xml/XmlNodePrinter.java | 5 +-
.../src/main/java/groovy/xml/XmlParser.java | 5 +-
.../src/main/java/groovy/xml/XmlSlurper.java | 14 ++--
.../src/main/java/groovy/xml/XmlUtil.java | 3 +-
.../java/groovy/xml/slurpersupport/Attribute.java | 2 +-
.../java/groovy/xml/slurpersupport/Attributes.java | 2 +-
.../xml/slurpersupport/FilteredAttributes.java | 2 +-
.../xml/slurpersupport/FilteredNodeChildren.java | 2 +-
.../groovy/xml/slurpersupport/GPathResult.java | 2 +-
.../xml/slurpersupport/NamespaceAwareHashMap.java | 2 +-
.../java/groovy/xml/slurpersupport/NoChildren.java | 2 +-
.../main/java/groovy/xml/slurpersupport/Node.java | 2 +-
.../java/groovy/xml/slurpersupport/NodeChild.java | 2 +-
.../groovy/xml/slurpersupport/NodeChildren.java | 2 +-
.../groovy/xml/slurpersupport/NodeIterator.java | 2 +-
.../groovy/xml/slurpersupport/NodeParents.java | 2 +-
.../groovy/xml/slurpersupport/ReplacementNode.java | 2 +-
.../java/groovy/xml/slurpersupport/package.html | 2 +-
.../{XmlGroovyMethods.java => XmlExtensions.java} | 4 +-
.../org/apache/groovy/xml/tools/DomToGroovy.java | 2 +-
.../codehaus/groovy/runtime/XmlGroovyMethods.java | 3 +
.../org/codehaus/groovy/tools/xml/DomToGroovy.java | 1 +
.../src/spec/test/UserGuideXmlSlurperTest.groovy | 8 ++-
.../groovy/groovy/xml/BuilderTestSupport.groovy | 3 +-
.../groovy/groovy/{util => xml}/CustomNode.java | 5 +-
.../groovy/{util => xml}/CustomXmlParser.java | 6 +-
.../groovy/{tree => xml}/NavigationXmlTest.groovy | 4 +-
.../xml/SafeNumberXmlParserTest.groovy} | 5 +-
.../SafeNumberXmlSlurperTest.groovy} | 36 +++++-----
.../groovy/xml/{vm6 => }/StaxBuilderTest.groovy | 9 +--
.../groovy/xml/StreamingSAXBuilderTest.groovy | 16 +++--
.../groovy/xml/UseMarkupWithWriterScript.groovy | 6 +-
.../groovy/xml/XmlJavadocAssertionTest.groovy | 1 +
.../groovy/{util => xml}/XmlNodePrinterTest.groovy | 2 +-
.../groovy/{util => xml}/XmlParserTest.groovy | 7 +-
.../groovy/{util => xml}/XmlSlurperTest.groovy | 8 +--
.../src/test/groovy/groovy/xml/XmlTest.java | 4 +-
.../src/test/groovy/groovy/xml/XmlUtilTest.groovy | 3 +-
.../xml/benchmark}/BuilderPerfTest.groovy | 3 +
.../groovy/{ => xml}/bugs/Groovy249_Bug.groovy | 3 +-
.../groovy/{ => xml}/bugs/Groovy4285Bug.groovy | 4 +-
.../groovy/{ => xml}/bugs/Groovy593_Bug.groovy | 4 +-
.../groovy/{ => xml}/bugs/Groovy_2473Bug.groovy | 3 +-
.../groovy/{ => xml}/bugs/MarkupInScriptBug.java | 8 +--
.../groovy/{ => xml}/bugs/StaticMarkupBug.groovy | 2 +-
.../groovy/{ => xml}/bugs/TedsClosureBug.groovy | 4 +-
.../groovy/groovy/xml/dom/DOMCategoryTest.groovy | 6 +-
.../src/test/groovy/groovy/xml/dom/DOMTest.groovy | 1 +
.../groovy/groovy/xml/dom/NamespaceDOMTest.groovy | 7 +-
.../{ => groovy/xml}/script/AtomTestScript.groovy | 4 +-
.../groovy/xml/tools}/DomToGroovyTest.groovy | 9 ++-
.../src/test/groovy/script/MarkupTestScript.groovy | 40 -----------
.../src/test/groovy/util/NavToWiki.groovy | 59 ----------------
.../tools/xml => apache/groovy/xml/tools}/po.xsd | 0
.../xml => apache/groovy/xml/tools}/swing.xml | 0
.../xml => apache/groovy/xml/tools}/swing2.xml | 0
.../xml => apache/groovy/xml/tools}/test1.xml | 0
74 files changed, 239 insertions(+), 207 deletions(-)
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/XmlNodePrinter.java b/subprojects/groovy-xml/src/main/java/groovy/util/XmlNodePrinter.java
index eac1b00..f29ccc2 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/XmlNodePrinter.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/XmlNodePrinter.java
@@ -44,7 +44,9 @@ import java.util.Map;
*
* @see groovy.util.NodePrinter
* @see groovy.xml.XmlUtil#serialize(Node)
+ * @deprecated use {@link groovy.xml.XmlNodePrinter}
*/
+@Deprecated
public class XmlNodePrinter {
protected final IndentPrinter out;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java b/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java
index 4320d97..ce28050 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java
@@ -65,7 +65,10 @@ import java.util.Map;
* assert rootNode.two.text() == 'Some text!'
* rootNode.children().each { assert it.name() in ['one','two'] }
* </pre>
+ *
+ * @deprecated use {@link groovy.xml.XmlParser}
*/
+@Deprecated
public class XmlParser implements ContentHandler {
private StringBuilder bodyText = new StringBuilder();
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java b/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java
index a154cf0..90e6bb3 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java
@@ -77,7 +77,9 @@ import java.util.Stack;
* </pre>
*
* @see GPathResult
+ * @deprecated use {@link groovy.xml.XmlSlurper}
*/
+@Deprecated
public class XmlSlurper extends DefaultHandler {
private final XMLReader reader;
private Node currentNode = null;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/XmlUtil.java b/subprojects/groovy-xml/src/main/java/groovy/util/XmlUtil.java
new file mode 100644
index 0000000..0443ca0
--- /dev/null
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/XmlUtil.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package groovy.util;
+
+import groovy.lang.Writable;
+import groovy.util.slurpersupport.GPathResult;
+import org.codehaus.groovy.runtime.InvokerHelper;
+
+import java.io.OutputStream;
+import java.io.Writer;
+
+/**
+ * Used for pretty printing XML content and other XML related utilities.
+ */
+@Deprecated
+public class XmlUtil {
+ /**
+ * Return a pretty version of the GPathResult.
+ *
+ * @param node a GPathResult to serialize to a String
+ * @return the pretty String representation of the GPathResult
+ */
+ @Deprecated
+ public static String serialize(GPathResult node) {
+ return groovy.xml.XmlUtil.serialize(asString(node));
+ }
+
+ /**
+ * Write a pretty version of the GPathResult to the OutputStream.
+ *
+ * @param node a GPathResult to serialize
+ * @param os the OutputStream to write to
+ */
+ @Deprecated
+ public static void serialize(GPathResult node, OutputStream os) {
+ groovy.xml.XmlUtil.serialize(asString(node), os);
+ }
+
+ /**
+ * Write a pretty version of the GPathResult to the Writer.
+ *
+ * @param node a GPathResult to serialize
+ * @param w the Writer to write to
+ */
+ @Deprecated
+ public static void serialize(GPathResult node, Writer w) {
+ groovy.xml.XmlUtil.serialize(asString(node), w);
+ }
+
+ private static String asString(GPathResult node) {
+ // little bit of hackery to avoid Groovy dependency in this file
+ try {
+ Object builder = Class.forName("groovy.xml.StreamingMarkupBuilder").getDeclaredConstructor().newInstance();
+ InvokerHelper.setProperty(builder, "encoding", "UTF-8");
+ Writable w = (Writable) InvokerHelper.invokeMethod(builder, "bindNode", node);
+ return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + w.toString();
+ } catch (Exception e) {
+ return "Couldn't convert node to string because: " + e.getMessage();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Attribute.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Attribute.java
index 1172e01..d8a3e20 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Attribute.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Attribute.java
@@ -31,6 +31,7 @@ import java.util.Map;
/**
* Lazy evaluated representation of a node attribute.
*/
+@Deprecated
public class Attribute extends GPathResult {
private final String value;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Attributes.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Attributes.java
index 3ad93f7..8664dff 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Attributes.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Attributes.java
@@ -33,6 +33,7 @@ import java.util.Map;
/**
* Lazy evaluated representation of a node's attributes.
*/
+@Deprecated
public class Attributes extends NodeChildren {
final String attributeName;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/FilteredAttributes.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/FilteredAttributes.java
index 353b100..56fbb1a 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/FilteredAttributes.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/FilteredAttributes.java
@@ -27,8 +27,8 @@ import java.util.Map;
/**
* Lazy evaluated representation of a node's attributes filtered by a Closure.
*/
-public class FilteredAttributes extends Attributes
-{
+@Deprecated
+public class FilteredAttributes extends Attributes {
private final Closure closure;
/**
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/FilteredNodeChildren.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/FilteredNodeChildren.java
index 0bc1d2e..0459427 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/FilteredNodeChildren.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/FilteredNodeChildren.java
@@ -27,6 +27,7 @@ import java.util.Map;
/**
* Lazy evaluated representation of child nodes filtered by a Closure.
*/
+@Deprecated
public class FilteredNodeChildren extends NodeChildren {
private final Closure closure;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
index abd1c66..e4f8438 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
@@ -48,6 +48,7 @@ import java.util.Stack;
/**
* Base class for representing lazy evaluated GPath expressions.
*/
+@Deprecated
public abstract class GPathResult extends GroovyObjectSupport implements Writable, Buildable, Iterable {
protected final GPathResult parent;
protected final String name;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NamespaceAwareHashMap.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NamespaceAwareHashMap.java
index 3508c02..7199765 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NamespaceAwareHashMap.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NamespaceAwareHashMap.java
@@ -23,6 +23,7 @@ import groovy.xml.QName;
import java.util.HashMap;
import java.util.Map;
+@Deprecated
public class NamespaceAwareHashMap extends HashMap<String, String> {
public void setNamespaceTagHints(Map namespaceTagHints) {
this.namespaceTagHints = namespaceTagHints;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NoChildren.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NoChildren.java
index 92ad881..8f6de18 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NoChildren.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NoChildren.java
@@ -33,6 +33,7 @@ import java.util.Map;
* As this class represents a GPath expression with no results, all methods
* are either NOPs or return an empty result.
*/
+@Deprecated
public class NoChildren extends GPathResult {
/**
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Node.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Node.java
index 23e7cb7..596d3bb 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Node.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/Node.java
@@ -36,6 +36,7 @@ import java.util.Stack;
/**
* Represents a node.
*/
+@Deprecated
public class Node implements Writable {
private final String name;
private final Map attributes;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeChild.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeChild.java
index 38b3287..9d97d0e 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeChild.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeChild.java
@@ -32,6 +32,7 @@ import java.util.Map;
/**
* Lazy evaluated representation of a child node.
*/
+@Deprecated
public class NodeChild extends GPathResult {
private final Node node;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeChildren.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeChildren.java
index bef9567..8f1532c 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeChildren.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeChildren.java
@@ -32,6 +32,7 @@ import java.util.Map;
/**
* Lazy evaluated representation of child nodes.
*/
+@Deprecated
public class NodeChildren extends GPathResult {
private int size = -1;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeIterator.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeIterator.java
index beecd21..0f092d7 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeIterator.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeIterator.java
@@ -23,6 +23,7 @@ import java.util.Iterator;
/**
* Helper class for iterating through nodes.
*/
+@Deprecated
public abstract class NodeIterator implements Iterator {
private static final Object DELAYED_INIT = new Object();
private final Iterator iter;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeParents.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeParents.java
index f8de7c1..dcf7913 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeParents.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/NodeParents.java
@@ -24,6 +24,7 @@ import java.util.Map;
/**
* Lazy evaluated representation of parent nodes without duplicates
*/
+@Deprecated
public class NodeParents extends NodeChildren {
/**
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/ReplacementNode.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/ReplacementNode.java
index c28e3a0..39654f7 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/ReplacementNode.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/ReplacementNode.java
@@ -29,6 +29,7 @@ import java.util.Map;
/**
* Helper base class used for lazy updates.
*/
+@Deprecated
public abstract class ReplacementNode implements Buildable, Writable {
public abstract void build(GroovyObject builder, Map namespaceMap, Map<String, String> namespaceTagHints);
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlNodePrinter.java b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlNodePrinter.java
index eac1b00..7bd4bb2 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlNodePrinter.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlNodePrinter.java
@@ -16,9 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util;
+package groovy.xml;
-import groovy.xml.QName;
+import groovy.util.IndentPrinter;
+import groovy.util.Node;
import org.codehaus.groovy.runtime.InvokerHelper;
import java.io.OutputStreamWriter;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlParser.java b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlParser.java
index 4320d97..bc53ff0 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlParser.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlParser.java
@@ -16,10 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util;
+package groovy.xml;
-import groovy.xml.FactorySupport;
-import groovy.xml.QName;
+import groovy.util.Node;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.DTDHandler;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlSlurper.java b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlSlurper.java
index a154cf0..6e78b41 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlSlurper.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlSlurper.java
@@ -16,14 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util;
-
-import groovy.util.slurpersupport.GPathResult;
-import groovy.util.slurpersupport.NamespaceAwareHashMap;
-import groovy.util.slurpersupport.Node;
-import groovy.util.slurpersupport.NodeChild;
-import groovy.xml.FactorySupport;
-import groovy.xml.QName;
+package groovy.xml;
+
+import groovy.xml.slurpersupport.GPathResult;
+import groovy.xml.slurpersupport.NamespaceAwareHashMap;
+import groovy.xml.slurpersupport.Node;
+import groovy.xml.slurpersupport.NodeChild;
import org.xml.sax.Attributes;
import org.xml.sax.DTDHandler;
import org.xml.sax.EntityResolver;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java
index 012769f..7880cbd 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java
@@ -22,8 +22,7 @@ import groovy.lang.Closure;
import groovy.lang.GroovyRuntimeException;
import groovy.lang.Writable;
import groovy.util.Node;
-import groovy.util.XmlNodePrinter;
-import groovy.util.slurpersupport.GPathResult;
+import groovy.xml.slurpersupport.GPathResult;
import org.apache.groovy.io.StringBuilderWriter;
import org.codehaus.groovy.runtime.InvokerHelper;
import org.codehaus.groovy.runtime.StringGroovyMethods;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attribute.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attribute.java
index 1172e01..c8a4faf 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attribute.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attribute.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Closure;
import groovy.lang.GroovyObject;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attributes.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attributes.java
index 3ad93f7..b1d81bc 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attributes.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attributes.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Closure;
import groovy.lang.GroovyObject;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/FilteredAttributes.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/FilteredAttributes.java
index 353b100..fa25ba5 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/FilteredAttributes.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/FilteredAttributes.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Closure;
import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/FilteredNodeChildren.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/FilteredNodeChildren.java
index 0bc1d2e..e8ec8e1 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/FilteredNodeChildren.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/FilteredNodeChildren.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Closure;
import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/GPathResult.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/GPathResult.java
index abd1c66..3c1a0e5 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/GPathResult.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/GPathResult.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Buildable;
import groovy.lang.Closure;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NamespaceAwareHashMap.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NamespaceAwareHashMap.java
index 3508c02..0a3a9e2 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NamespaceAwareHashMap.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NamespaceAwareHashMap.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.xml.QName;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NoChildren.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NoChildren.java
index 92ad881..155bb21 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NoChildren.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NoChildren.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Closure;
import groovy.lang.GroovyObject;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Node.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Node.java
index 23e7cb7..73041d1 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Node.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Node.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Buildable;
import groovy.lang.Closure;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeChild.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeChild.java
index 38b3287..2456a06 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeChild.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeChild.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Closure;
import groovy.lang.GroovyObject;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeChildren.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeChildren.java
index bef9567..ba760dc 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeChildren.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeChildren.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Buildable;
import groovy.lang.Closure;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeIterator.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeIterator.java
index beecd21..3b49874 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeIterator.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeIterator.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import java.util.Iterator;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeParents.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeParents.java
index f8de7c1..6b5618b 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeParents.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/NodeParents.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import java.util.Iterator;
import java.util.Map;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/ReplacementNode.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/ReplacementNode.java
index c28e3a0..bc6baf3 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/ReplacementNode.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/ReplacementNode.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util.slurpersupport;
+package groovy.xml.slurpersupport;
import groovy.lang.Buildable;
import groovy.lang.GroovyObject;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/package.html b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/package.html
index a47137e..fc9cb10 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/package.html
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/package.html
@@ -20,7 +20,7 @@
-->
<html>
<head>
- <title>package groovy.util.slurpersupport.*</title>
+ <title>package groovy.xml.slurpersupport.*</title>
</head>
<body>
<p>Helper classes for XmlSlurper.</p>
diff --git a/subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/extensions/XmlGroovyMethods.java b/subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/extensions/XmlExtensions.java
similarity index 97%
rename from subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/extensions/XmlGroovyMethods.java
rename to subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/extensions/XmlExtensions.java
index 5c1c093..8e0aaed 100644
--- a/subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/extensions/XmlGroovyMethods.java
+++ b/subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/extensions/XmlExtensions.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.codehaus.groovy.runtime;
+package org.apache.groovy.xml.extensions;
import groovy.xml.XmlUtil;
import org.w3c.dom.Element;
@@ -30,7 +30,7 @@ import java.util.Iterator;
* the normal JDK XML classes when inside the Groovy environment.
* Static methods are used with the first parameter the destination class.
*/
-public class XmlGroovyMethods {
+public class XmlExtensions {
/**
* Makes NodeList iterable by returning a read-only Iterator which traverses
diff --git a/subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/tools/DomToGroovy.java b/subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/tools/DomToGroovy.java
index d4d8dc9..b703b18 100644
--- a/subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/tools/DomToGroovy.java
+++ b/subprojects/groovy-xml/src/main/java/org/apache/groovy/xml/tools/DomToGroovy.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.codehaus.groovy.tools.xml;
+package org.apache.groovy.xml.tools;
import groovy.util.IndentPrinter;
import org.codehaus.groovy.syntax.Types;
diff --git a/subprojects/groovy-xml/src/main/java/org/codehaus/groovy/runtime/XmlGroovyMethods.java b/subprojects/groovy-xml/src/main/java/org/codehaus/groovy/runtime/XmlGroovyMethods.java
index 5c1c093..3d899da 100644
--- a/subprojects/groovy-xml/src/main/java/org/codehaus/groovy/runtime/XmlGroovyMethods.java
+++ b/subprojects/groovy-xml/src/main/java/org/codehaus/groovy/runtime/XmlGroovyMethods.java
@@ -30,6 +30,7 @@ import java.util.Iterator;
* the normal JDK XML classes when inside the Groovy environment.
* Static methods are used with the first parameter the destination class.
*/
+@Deprecated
public class XmlGroovyMethods {
/**
@@ -40,6 +41,7 @@ public class XmlGroovyMethods {
* @return an Iterator for a NodeList
* @since 1.0
*/
+ @Deprecated
public static Iterator<Node> iterator(final NodeList nodeList) {
return new Iterator<Node>() {
private int current /* = 0 */;
@@ -66,6 +68,7 @@ public class XmlGroovyMethods {
* @return the string representation of the element
* @since 2.1
*/
+ @Deprecated
public static String serialize(Element element) {
return XmlUtil.serialize(element).replaceFirst("<\\?xml version=\"1.0\".*\\?>", "");
}
diff --git a/subprojects/groovy-xml/src/main/java/org/codehaus/groovy/tools/xml/DomToGroovy.java b/subprojects/groovy-xml/src/main/java/org/codehaus/groovy/tools/xml/DomToGroovy.java
index d4d8dc9..46eaeb6 100644
--- a/subprojects/groovy-xml/src/main/java/org/codehaus/groovy/tools/xml/DomToGroovy.java
+++ b/subprojects/groovy-xml/src/main/java/org/codehaus/groovy/tools/xml/DomToGroovy.java
@@ -48,6 +48,7 @@ import java.util.Map;
/**
* A SAX handler for turning XML into Groovy scripts
*/
+@Deprecated
public class DomToGroovy {
protected IndentPrinter out;
diff --git a/subprojects/groovy-xml/src/spec/test/UserGuideXmlSlurperTest.groovy b/subprojects/groovy-xml/src/spec/test/UserGuideXmlSlurperTest.groovy
index 94a5f27..e91aad8 100644
--- a/subprojects/groovy-xml/src/spec/test/UserGuideXmlSlurperTest.groovy
+++ b/subprojects/groovy-xml/src/spec/test/UserGuideXmlSlurperTest.groovy
@@ -16,11 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.xml
-
/**
* Tests for the Groovy Xml user guide related to XmlSlurper.
*/
+import groovy.xml.StreamingMarkupBuilder
+import groovy.xml.XmlSlurper
+import groovy.test.GroovyTestCase
+
class UserGuideXmlSlurperTest extends GroovyTestCase {
// tag::books[]
@@ -62,7 +64,7 @@ class UserGuideXmlSlurperTest extends GroovyTestCase {
def list = new XmlSlurper().parseText(text) // <1>
- assert list instanceof groovy.util.slurpersupport.GPathResult // <2>
+ assert list instanceof groovy.xml.slurpersupport.GPathResult // <2>
assert list.technology.name == 'Groovy' // <3>
// end::testParseText[]
}
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/BuilderTestSupport.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/BuilderTestSupport.groovy
index 05bafea..8752bbe 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/BuilderTestSupport.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/BuilderTestSupport.groovy
@@ -18,8 +18,9 @@
*/
package groovy.xml
-import org.custommonkey.xmlunit.XMLUnit
+import groovy.test.GroovyTestCase
import org.custommonkey.xmlunit.Diff
+import org.custommonkey.xmlunit.XMLUnit
/**
* Common test cases for StreamingMarkupBuilder and MarkupBuilder.
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/util/CustomNode.java b/subprojects/groovy-xml/src/test/groovy/groovy/xml/CustomNode.java
similarity index 93%
rename from subprojects/groovy-xml/src/test/groovy/groovy/util/CustomNode.java
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/CustomNode.java
index e58e8a0..cdd9c65 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/util/CustomNode.java
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/CustomNode.java
@@ -16,7 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util;
+package groovy.xml;
+
+import groovy.util.Node;
+import groovy.util.NodeList;
import java.util.Map;
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/util/CustomXmlParser.java b/subprojects/groovy-xml/src/test/groovy/groovy/xml/CustomXmlParser.java
similarity index 92%
rename from subprojects/groovy-xml/src/test/groovy/groovy/util/CustomXmlParser.java
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/CustomXmlParser.java
index 24d63fd..3cbe3bf 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/util/CustomXmlParser.java
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/CustomXmlParser.java
@@ -16,8 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util;
+package groovy.xml;
+import groovy.util.Node;
+import groovy.util.NodeList;
import org.xml.sax.SAXException;
import javax.xml.parsers.ParserConfigurationException;
@@ -29,7 +31,7 @@ class CustomXmlParser extends XmlParser {
}
protected Object getElementName(String s, String s1, String s2) {
- return new Integer(42);
+ return Integer.valueOf(42);
}
protected Node createNode(Node parent, Object name, Map attributes) {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/tree/NavigationXmlTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/NavigationXmlTest.groovy
similarity index 98%
rename from subprojects/groovy-xml/src/test/groovy/groovy/tree/NavigationXmlTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/NavigationXmlTest.groovy
index f9e0d37..686fa32 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/tree/NavigationXmlTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/NavigationXmlTest.groovy
@@ -16,7 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.tree
+package groovy.xml
+
+import groovy.test.GroovyTestCase
/**
* Simple test of tree walking for XML
diff --git a/subprojects/groovy-xml/src/test/groovy/util/SafeNumberParsingNodeTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/SafeNumberXmlParserTest.groovy
similarity index 96%
rename from subprojects/groovy-xml/src/test/groovy/util/SafeNumberParsingNodeTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/SafeNumberXmlParserTest.groovy
index 520cc5f..95fb1bf 100644
--- a/subprojects/groovy-xml/src/test/groovy/util/SafeNumberParsingNodeTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/SafeNumberXmlParserTest.groovy
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
+package groovy.xml
-package util
+import groovy.test.GroovyTestCase
-class SafeNumberParsingNodeTest extends GroovyTestCase {
+class SafeNumberXmlParserTest extends GroovyTestCase {
void testSafetyWhenConvertingToNumbers() {
def xmlText = '''
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/util/SafeNumberParsingTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/SafeNumberXmlSlurperTest.groovy
similarity index 57%
rename from subprojects/groovy-xml/src/test/groovy/groovy/util/SafeNumberParsingTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/SafeNumberXmlSlurperTest.groovy
index 40e5f14..d98778e 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/util/SafeNumberParsingTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/SafeNumberXmlSlurperTest.groovy
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
+package groovy.xml
-package groovy.util
+import groovy.test.GroovyTestCase
-
-class SafeNumberParsingTest extends GroovyTestCase {
+class SafeNumberXmlSlurperTest extends GroovyTestCase {
void testSafetyWhenConvertingToNumbers() {
def xmlText = '''
@@ -39,20 +39,20 @@ class SafeNumberParsingTest extends GroovyTestCase {
'''
def xml = new XmlSlurper().parseText(xmlText)
- assert xml.'**'.find{it.name() == 'someBigDecimal'}.toBigDecimal() == 123.4
- assert xml.'**'.find{it.name() == 'someEmptyBigDecimal'}.toBigDecimal() == null
- assert xml.'**'.find{it.name() == 'someMissingBigDecimal'}?.toBigDecimal() == null
- assert xml.'**'.find{it.name() == 'someLong'}.toLong() == 123
- assert xml.'**'.find{it.name() == 'someEmptyLong'}.toLong() == null
- assert xml.'**'.find{it.name() == 'someMissingLong'}?.toLong() == null
- assert xml.'**'.find{it.name() == 'someFloat'}.toFloat() == 123.4.toFloat()
- assert xml.'**'.find{it.name() == 'someEmptyFloat'}.toFloat() == null
- assert xml.'**'.find{it.name() == 'someMissingFloat'}?.toFloat() == null
- assert xml.'**'.find{it.name() == 'someDouble'}.toDouble() == 123.4.toDouble()
- assert xml.'**'.find{it.name() == 'someEmptyDouble'}.toDouble() == null
- assert xml.'**'.find{it.name() == 'someMissingDouble'}?.toDouble() == null
- assert xml.'**'.find{it.name() == 'someInteger'}.toInteger() == 123
- assert xml.'**'.find{it.name() == 'someEmptyInteger'}.toInteger() == null
- assert xml.'**'.find{it.name() == 'someMissingInteger'}?.toInteger() == null
+ assert xml.'**'.find { it.name() == 'someBigDecimal' }.toBigDecimal() == 123.4
+ assert xml.'**'.find { it.name() == 'someEmptyBigDecimal' }.toBigDecimal() == null
+ assert xml.'**'.find { it.name() == 'someMissingBigDecimal' }?.toBigDecimal() == null
+ assert xml.'**'.find { it.name() == 'someLong' }.toLong() == 123
+ assert xml.'**'.find { it.name() == 'someEmptyLong' }.toLong() == null
+ assert xml.'**'.find { it.name() == 'someMissingLong' }?.toLong() == null
+ assert xml.'**'.find { it.name() == 'someFloat' }.toFloat() == 123.4.toFloat()
+ assert xml.'**'.find { it.name() == 'someEmptyFloat' }.toFloat() == null
+ assert xml.'**'.find { it.name() == 'someMissingFloat' }?.toFloat() == null
+ assert xml.'**'.find { it.name() == 'someDouble' }.toDouble() == 123.4.toDouble()
+ assert xml.'**'.find { it.name() == 'someEmptyDouble' }.toDouble() == null
+ assert xml.'**'.find { it.name() == 'someMissingDouble' }?.toDouble() == null
+ assert xml.'**'.find { it.name() == 'someInteger' }.toInteger() == 123
+ assert xml.'**'.find { it.name() == 'someEmptyInteger' }.toInteger() == null
+ assert xml.'**'.find { it.name() == 'someMissingInteger' }?.toInteger() == null
}
}
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/vm6/StaxBuilderTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/StaxBuilderTest.groovy
similarity index 97%
rename from subprojects/groovy-xml/src/test/groovy/groovy/xml/vm6/StaxBuilderTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/StaxBuilderTest.groovy
index 0777cbd..5f3a946 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/vm6/StaxBuilderTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/StaxBuilderTest.groovy
@@ -16,12 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.xml.vm6
+package groovy.xml
-import javax.xml.stream.XMLOutputFactory
-import groovy.xml.StaxBuilder
-import org.custommonkey.xmlunit.XMLUnit
+import groovy.test.GroovyTestCase
import org.custommonkey.xmlunit.Diff
+import org.custommonkey.xmlunit.XMLUnit
+
+import javax.xml.stream.XMLOutputFactory
//import org.codehaus.jettison.mapped.*
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/StreamingSAXBuilderTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/StreamingSAXBuilderTest.groovy
index bbc1982..13f2ed2 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/StreamingSAXBuilderTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/StreamingSAXBuilderTest.groovy
@@ -18,15 +18,17 @@
*/
package groovy.xml
+import groovy.test.GroovyTestCase
+import org.custommonkey.xmlunit.Diff
+import org.custommonkey.xmlunit.XMLUnit
+import org.xml.sax.ContentHandler
+
import javax.xml.transform.TransformerFactory
import javax.xml.transform.stream.StreamResult
-import groovy.xml.StreamingSAXBuilder
-import org.xml.sax.ContentHandler
-import org.custommonkey.xmlunit.*
-public class StreamingSAXBuilderTest extends GroovyTestCase {
+class StreamingSAXBuilderTest extends GroovyTestCase {
- public void testDefaultSerialization() {
+ void testDefaultSerialization() {
def handler = TransformerFactory.newInstance().newTransformerHandler()
def outstream = new ByteArrayOutputStream()
handler.setResult(new StreamResult(outstream))
@@ -44,7 +46,7 @@ public class StreamingSAXBuilderTest extends GroovyTestCase {
assert xmlDiff.similar(), xmlDiff.toString()
}
- public void testDefaultSerializationNamespaces() {
+ void testDefaultSerializationNamespaces() {
def handler = TransformerFactory.newInstance().newTransformerHandler()
def outstream = new ByteArrayOutputStream()
handler.setResult(new StreamResult(outstream))
@@ -64,7 +66,7 @@ public class StreamingSAXBuilderTest extends GroovyTestCase {
assert xmlDiff.similar(), xmlDiff.toString()
}
- public void testCustomHandler() {
+ void testCustomHandler() {
def visited = []
def handler = [
startDocument: {->
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/UseMarkupWithWriterScript.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/UseMarkupWithWriterScript.groovy
index b2c61f2..00f03b6 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/UseMarkupWithWriterScript.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/UseMarkupWithWriterScript.groovy
@@ -16,10 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
+package groovy.xml
+
// used by MarkupWithWriterTest.testWriterUseInScriptFile
-writer = new java.io.StringWriter()
-b = new groovy.xml.MarkupBuilder(writer)
+writer = new StringWriter()
+b = new MarkupBuilder(writer)
b.root1(a:5)
println writer.toString()
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
index d3115f5..60f80c9 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
@@ -20,6 +20,7 @@ package groovy.xml
import org.junit.runners.Suite
import org.junit.runner.RunWith
+import groovy.test.JavadocAssertionTestSuite
@RunWith(Suite)
@Suite.SuiteClasses(JavadocAssertionTestSuite)
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/util/XmlNodePrinterTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlNodePrinterTest.groovy
similarity index 99%
rename from subprojects/groovy-xml/src/test/groovy/groovy/util/XmlNodePrinterTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlNodePrinterTest.groovy
index a4454ac..b5fc4d4 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/util/XmlNodePrinterTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlNodePrinterTest.groovy
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util
+package groovy.xml
class XmlNodePrinterTest extends GroovyTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/util/XmlParserTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlParserTest.groovy
similarity index 98%
rename from subprojects/groovy-xml/src/test/groovy/groovy/util/XmlParserTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlParserTest.groovy
index beeda33..6288164 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/util/XmlParserTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlParserTest.groovy
@@ -16,12 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util
+package groovy.xml
-import groovy.xml.GpathSyntaxTestSupport
-import groovy.xml.MixedMarkupTestSupport
-import groovy.xml.TraversalTestSupport
-import groovy.xml.QName
+import groovy.test.GroovyTestCase
class XmlParserTest extends GroovyTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/util/XmlSlurperTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlSlurperTest.groovy
similarity index 98%
rename from subprojects/groovy-xml/src/test/groovy/groovy/util/XmlSlurperTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlSlurperTest.groovy
index 32a905b..c92c532 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/util/XmlSlurperTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlSlurperTest.groovy
@@ -16,12 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.util
+package groovy.xml
+
+import groovy.test.GroovyTestCase
-import groovy.xml.TraversalTestSupport
-import groovy.xml.GpathSyntaxTestSupport
-import groovy.xml.MixedMarkupTestSupport
-import groovy.xml.StreamingMarkupBuilder
import static groovy.xml.XmlUtil.serialize
class XmlSlurperTest extends GroovyTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlTest.java b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlTest.java
index f85e727..645e7f5 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlTest.java
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlTest.java
@@ -18,7 +18,7 @@
*/
package groovy.xml;
-import groovy.util.GroovyTestCase;
+import groovy.test.GroovyTestCase;
public class XmlTest extends GroovyTestCase {
@@ -28,7 +28,7 @@ public class XmlTest extends GroovyTestCase {
// script.invokeMethod("testXsdSchemaWithBuilderHavingAutoPrefix", null);
// }
- public void testQName() throws Exception {
+ public void testQName() {
QName qname = new QName("urn:mynamespace", "localPart", "x");
assertTrue(qname.equals(new QName("urn:mynamespace", "localPart")));
assertTrue(qname.equals("urn:mynamespace:localPart"));
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlUtilTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlUtilTest.groovy
index fc3f479..31ee8e6 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlUtilTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlUtilTest.groovy
@@ -18,15 +18,16 @@
*/
package groovy.xml
+import groovy.test.GroovyTestCase
import org.xml.sax.ErrorHandler
import org.xml.sax.InputSource
import javax.xml.transform.stream.StreamSource
import static groovy.xml.XmlAssert.assertXmlEquals
-import static groovy.xml.XmlUtil.newSAXParser
import static groovy.xml.XmlUtil.escapeControlCharacters
import static groovy.xml.XmlUtil.escapeXml
+import static groovy.xml.XmlUtil.newSAXParser
import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI
class XmlUtilTest extends GroovyTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/org/codehaus/groovy/benchmarks/BuilderPerfTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/benchmark/BuilderPerfTest.groovy
similarity index 96%
rename from subprojects/groovy-xml/src/test/groovy/org/codehaus/groovy/benchmarks/BuilderPerfTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/benchmark/BuilderPerfTest.groovy
index aa0dba9..9d3c308 100644
--- a/subprojects/groovy-xml/src/test/groovy/org/codehaus/groovy/benchmarks/BuilderPerfTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/benchmark/BuilderPerfTest.groovy
@@ -16,6 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
+package groovy.xml.benchmark
+
+import groovy.test.GroovyTestCase
import groovy.xml.MarkupBuilder
class BuilderPerfTest extends GroovyTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy249_Bug.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy249_Bug.groovy
similarity index 97%
rename from subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy249_Bug.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy249_Bug.groovy
index b7c54b3..d8bc5c2 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy249_Bug.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy249_Bug.groovy
@@ -16,8 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.bugs
+package groovy.xml.bugs
+import groovy.test.GroovyTestCase
import groovy.xml.MarkupBuilder
class Groovy249_Bug extends GroovyTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy4285Bug.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy4285Bug.groovy
similarity index 94%
rename from subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy4285Bug.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy4285Bug.groovy
index 90250e4..323348f 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy4285Bug.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy4285Bug.groovy
@@ -16,8 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.bugs
+package groovy.xml.bugs
+import groovy.test.GroovyShellTestCase
+import groovy.xml.XmlSlurper
import groovy.xml.XmlUtil
class Groovy4285Bug extends GroovyShellTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy593_Bug.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy593_Bug.groovy
similarity index 96%
rename from subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy593_Bug.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy593_Bug.groovy
index 0179a19..a363188 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy593_Bug.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy593_Bug.groovy
@@ -16,9 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.bugs
+package groovy.xml.bugs
+import groovy.test.GroovyTestCase
import groovy.xml.MarkupBuilder
+import groovy.xml.XmlParser
/**
* Tests that special XML chars are made into entities by MarkupBuilder.
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy_2473Bug.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy_2473Bug.groovy
similarity index 96%
rename from subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy_2473Bug.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy_2473Bug.groovy
index 0c008d2..416f793 100755
--- a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/Groovy_2473Bug.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/Groovy_2473Bug.groovy
@@ -16,8 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.bugs
+package groovy.xml.bugs
+import groovy.test.GroovyTestCase
import groovy.xml.StreamingMarkupBuilder
class Groovy_2473Bug extends GroovyTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/MarkupInScriptBug.java b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/MarkupInScriptBug.java
similarity index 89%
rename from subprojects/groovy-xml/src/test/groovy/groovy/bugs/MarkupInScriptBug.java
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/MarkupInScriptBug.java
index 20721c4..7f04968 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/MarkupInScriptBug.java
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/MarkupInScriptBug.java
@@ -16,16 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.bugs;
+package groovy.xml.bugs;
import org.codehaus.groovy.classgen.TestSupport;
-
-/**
- */
public class MarkupInScriptBug extends TestSupport {
-
public void testBug() throws Exception {
- assertScriptFile("src/test/groovy/script/AtomTestScript.groovy");
+ assertScriptFile("src/test/groovy/groovy/xml/script/AtomTestScript.groovy");
}
}
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/StaticMarkupBug.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/StaticMarkupBug.groovy
similarity index 97%
rename from subprojects/groovy-xml/src/test/groovy/groovy/bugs/StaticMarkupBug.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/StaticMarkupBug.groovy
index 4657260..3fc4b29 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/StaticMarkupBug.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/StaticMarkupBug.groovy
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.bugs
+package groovy.xml.bugs
import groovy.xml.MarkupBuilder
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/TedsClosureBug.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/TedsClosureBug.groovy
similarity index 96%
rename from subprojects/groovy-xml/src/test/groovy/groovy/bugs/TedsClosureBug.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/TedsClosureBug.groovy
index 44a20c9..00e3632 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/bugs/TedsClosureBug.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/bugs/TedsClosureBug.groovy
@@ -16,9 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package groovy.bugs
+package groovy.xml.bugs
import groovy.xml.MarkupBuilder
+import groovy.test.GroovyTestCase
+import groovy.test.StringTestUtil
class TedsClosureBug extends GroovyTestCase {
def EXPECTED= '''<atom>
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/DOMCategoryTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/DOMCategoryTest.groovy
index 88c0b126..48ac7d6 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/DOMCategoryTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/DOMCategoryTest.groovy
@@ -18,13 +18,17 @@
*/
package groovy.xml.dom
+import groovy.test.GroovyTestCase
import groovy.xml.DOMBuilder
import groovy.xml.GpathSyntaxTestSupport
import groovy.xml.MixedMarkupTestSupport
import groovy.xml.TraversalTestSupport
import groovy.xml.XmlUtil
-import static javax.xml.xpath.XPathConstants.*
+import static javax.xml.xpath.XPathConstants.BOOLEAN
+import static javax.xml.xpath.XPathConstants.NODE
+import static javax.xml.xpath.XPathConstants.NODESET
+import static javax.xml.xpath.XPathConstants.NUMBER
class DOMCategoryTest extends GroovyTestCase {
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/DOMTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/DOMTest.groovy
index 1762064..f9a45b7 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/DOMTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/DOMTest.groovy
@@ -18,6 +18,7 @@
*/
package groovy.xml.dom
+import groovy.test.GroovyTestCase
import groovy.xml.DOMBuilder
import groovy.xml.StreamingDOMBuilder
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/NamespaceDOMTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/NamespaceDOMTest.groovy
index a88c8a9..0fb0220 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/NamespaceDOMTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/dom/NamespaceDOMTest.groovy
@@ -18,7 +18,12 @@
*/
package groovy.xml.dom
-import groovy.xml.*
+
+import groovy.xml.DOMBuilder
+import groovy.xml.NamespaceBuilder
+import groovy.xml.TestXmlSupport
+import groovy.xml.XmlUtil
+
import static groovy.xml.XmlAssert.assertXmlEquals
class NamespaceDOMTest extends TestXmlSupport {
diff --git a/subprojects/groovy-xml/src/test/groovy/script/AtomTestScript.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/script/AtomTestScript.groovy
similarity index 97%
rename from subprojects/groovy-xml/src/test/groovy/script/AtomTestScript.groovy
rename to subprojects/groovy-xml/src/test/groovy/groovy/xml/script/AtomTestScript.groovy
index 38a3cf4..121d64f 100644
--- a/subprojects/groovy-xml/src/test/groovy/script/AtomTestScript.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/script/AtomTestScript.groovy
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package script
+package groovy.xml.script
-import groovy.xml.MarkupBuilder;
+import groovy.xml.MarkupBuilder
/** note you could use Expando classes if you don't mind being dynamically typed
f = new Expando()
diff --git a/subprojects/groovy-xml/src/test/groovy/org/codehaus/groovy/tools/xml/DomToGroovyTest.groovy b/subprojects/groovy-xml/src/test/groovy/org/apache/groovy/xml/tools/DomToGroovyTest.groovy
similarity index 98%
rename from subprojects/groovy-xml/src/test/groovy/org/codehaus/groovy/tools/xml/DomToGroovyTest.groovy
rename to subprojects/groovy-xml/src/test/groovy/org/apache/groovy/xml/tools/DomToGroovyTest.groovy
index 8c327f9..3b540ed 100644
--- a/subprojects/groovy-xml/src/test/groovy/org/codehaus/groovy/tools/xml/DomToGroovyTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/org/apache/groovy/xml/tools/DomToGroovyTest.groovy
@@ -16,14 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.codehaus.groovy.tools.xml
+package org.apache.groovy.xml.tools
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
+import groovy.test.GroovyTestCase
+import groovy.test.StringTestUtil
import org.w3c.dom.Document
import org.xml.sax.InputSource
import org.xml.sax.SAXException
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
class DomToGroovyTest extends GroovyTestCase {
private static final String TEST_XML_1 =
diff --git a/subprojects/groovy-xml/src/test/groovy/script/MarkupTestScript.groovy b/subprojects/groovy-xml/src/test/groovy/script/MarkupTestScript.groovy
deleted file mode 100644
index d3a913f..0000000
--- a/subprojects/groovy-xml/src/test/groovy/script/MarkupTestScript.groovy
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import groovy.xml.MarkupBuilder
-
-class Bean {
- String b
-}
-
-t = new Bean()
-t.b = "hello"
-println t.b
-println "test: ${t.b}"
-
-xml = new MarkupBuilder()
-root = xml.foo {
- bar {
- // works
- baz("test")
- // fails
- baz(t.b)
- // fails
- baz("${t.b}")
- }
-}
diff --git a/subprojects/groovy-xml/src/test/groovy/util/NavToWiki.groovy b/subprojects/groovy-xml/src/test/groovy/util/NavToWiki.groovy
deleted file mode 100644
index 246b7a5..0000000
--- a/subprojects/groovy-xml/src/test/groovy/util/NavToWiki.groovy
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package util
-
-if (args.size() < 1) {
- println "Usage: NavToWiki fileName"
-}
-else {
- file = args[0]
- println "About to parse ${file}"
- doc = new XmlParser().parse(file)
-
- println """
-QuickLinks page
--------------------------------
-
-
-"""
- links = doc.body.links.item
- println links.collect {
- return "{link:" + it['@name'] + "|" + it['@href'] + "}"
- }.join(" | ")
-
- println """
-
-
-
-Navigation page
--------------------------------
-
-
-"""
- menus = doc.body.menu
- menus.each {
- println "h3:${it['@name']}"
-
- it.item.each {
- println "- {link:" + it['@name'] + "|" + it['@href'] + "}"
- }
- println ""
- }
-}
-
diff --git a/subprojects/groovy-xml/src/test/resources/org/codehaus/groovy/tools/xml/po.xsd b/subprojects/groovy-xml/src/test/resources/org/apache/groovy/xml/tools/po.xsd
similarity index 100%
rename from subprojects/groovy-xml/src/test/resources/org/codehaus/groovy/tools/xml/po.xsd
rename to subprojects/groovy-xml/src/test/resources/org/apache/groovy/xml/tools/po.xsd
diff --git a/subprojects/groovy-xml/src/test/resources/org/codehaus/groovy/tools/xml/swing.xml b/subprojects/groovy-xml/src/test/resources/org/apache/groovy/xml/tools/swing.xml
similarity index 100%
rename from subprojects/groovy-xml/src/test/resources/org/codehaus/groovy/tools/xml/swing.xml
rename to subprojects/groovy-xml/src/test/resources/org/apache/groovy/xml/tools/swing.xml
diff --git a/subprojects/groovy-xml/src/test/resources/org/codehaus/groovy/tools/xml/swing2.xml b/subprojects/groovy-xml/src/test/resources/org/apache/groovy/xml/tools/swing2.xml
similarity index 100%
rename from subprojects/groovy-xml/src/test/resources/org/codehaus/groovy/tools/xml/swing2.xml
rename to subprojects/groovy-xml/src/test/resources/org/apache/groovy/xml/tools/swing2.xml
diff --git a/subprojects/groovy-xml/src/test/resources/org/codehaus/groovy/tools/xml/test1.xml b/subprojects/groovy-xml/src/test/resources/org/apache/groovy/xml/tools/test1.xml
similarity index 100%
rename from subprojects/groovy-xml/src/test/resources/org/codehaus/groovy/tools/xml/test1.xml
rename to subprojects/groovy-xml/src/test/resources/org/apache/groovy/xml/tools/test1.xml