You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2022/02/16 16:08:48 UTC
[groovy] branch master updated: Trivial refactoring: inline variable
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 4243407 Trivial refactoring: inline variable
4243407 is described below
commit 4243407ac1a7e63bb271b529d4e1a2eaf525a906
Author: Daniel Sun <su...@apache.org>
AuthorDate: Thu Feb 17 00:08:05 2022 +0800
Trivial refactoring: inline variable
---
subprojects/groovy-xml/src/main/java/groovy/xml/XmlNodePrinter.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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 fdd419f..8dcb086 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlNodePrinter.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlNodePrinter.java
@@ -244,12 +244,11 @@ public class XmlNodePrinter {
protected void printList(List list, NamespaceContext ctx) {
out.incrementIndent();
for (Object value : list) {
- NamespaceContext context = new NamespaceContext(ctx);
/*
* If the current value is a node, recurse into that node.
*/
if (value instanceof Node) {
- print((Node) value, context);
+ print((Node) value, new NamespaceContext(ctx));
continue;
}
printSimpleItem(value);