This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit d62dd43b982a5fd8b050c9a81e659e8b8925e8cc
Author: Daniel Sun <[email protected]>
AuthorDate: Sat Apr 11 22:46:59 2020 +0800

    Trivial refactoring: Rename the extracted variable to align with other 
variable name rule
    
    (cherry picked from commit 86d5e802d74c3d8260f556908e3a2457c8ccaff7)
---
 .../groovy-xml/src/main/groovy/groovy/xml/StreamingDOMBuilder.groovy  | 2 +-
 .../src/main/groovy/groovy/xml/StreamingMarkupBuilder.groovy          | 2 +-
 .../groovy-xml/src/main/groovy/groovy/xml/StreamingSAXBuilder.groovy  | 2 +-
 .../groovy/xml/streamingmarkupsupport/AbstractStreamingBuilder.groovy | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingDOMBuilder.groovy 
b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingDOMBuilder.groovy
index 8441f7a..d625d13 100644
--- 
a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingDOMBuilder.groovy
+++ 
b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingDOMBuilder.groovy
@@ -37,7 +37,7 @@ class StreamingDOMBuilder extends AbstractStreamingBuilder {
         attrs.each {target, instruction ->
             def pi = null
             if (instruction instanceof Map) {
-                pi = dom.document.createProcessingInstruction(target, 
toMapString(instruction))
+                pi = dom.document.createProcessingInstruction(target, 
toMapStringClosure(instruction))
             } else {
                 pi = dom.document.createProcessingInstruction(target, 
instruction)
             }
diff --git 
a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingMarkupBuilder.groovy
 
b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingMarkupBuilder.groovy
index ce1c35b..1d50b08 100644
--- 
a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingMarkupBuilder.groovy
+++ 
b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingMarkupBuilder.groovy
@@ -75,7 +75,7 @@ class StreamingMarkupBuilder extends AbstractStreamingBuilder 
{
             out.unescaped() << "<?"
             if (instruction instanceof Map) {
                 out.unescaped() << target
-                out.unescaped() << toMapString(instruction) { value ->
+                out.unescaped() << toMapStringClosure(instruction) { value ->
                     def valueStr = value.toString()
                     valueStr.contains('\'') || (useDoubleQuotes && 
!valueStr.contains('"'))
                 }
diff --git 
a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingSAXBuilder.groovy 
b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingSAXBuilder.groovy
index 917d1ba..7b03ed4 100644
--- 
a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingSAXBuilder.groovy
+++ 
b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StreamingSAXBuilder.groovy
@@ -35,7 +35,7 @@ class StreamingSAXBuilder extends AbstractStreamingBuilder {
     def piClosure = {doc, pendingNamespaces, namespaces, 
namespaceSpecificTags, prefix, attrs, body, contentHandler ->
         attrs.each {target, instruction ->
             if (instruction instanceof Map) {
-                contentHandler.processingInstruction(target, 
toMapString(instruction))
+                contentHandler.processingInstruction(target, 
toMapStringClosure(instruction))
             } else {
                 contentHandler.processingInstruction(target, instruction)
             }
diff --git 
a/subprojects/groovy-xml/src/main/groovy/groovy/xml/streamingmarkupsupport/AbstractStreamingBuilder.groovy
 
b/subprojects/groovy-xml/src/main/groovy/groovy/xml/streamingmarkupsupport/AbstractStreamingBuilder.groovy
index a109e4a..f2a7b16 100644
--- 
a/subprojects/groovy-xml/src/main/groovy/groovy/xml/streamingmarkupsupport/AbstractStreamingBuilder.groovy
+++ 
b/subprojects/groovy-xml/src/main/groovy/groovy/xml/streamingmarkupsupport/AbstractStreamingBuilder.groovy
@@ -60,9 +60,9 @@ class AbstractStreamingBuilder {
             }
         }
     }
-    def getNamespaceClosure = {doc, pendingNamespaces, namespaces, Object[] 
rest -> [namespaces, pendingNamespaces]}
+    def getNamespaceClosure = { doc, pendingNamespaces, namespaces, Object[] 
rest -> [namespaces, pendingNamespaces] }
 
-    def toMapString = { Map instruction, checkDoubleQutationMarks={value -> 
!value.toString().contains('"')} ->
+    def toMapStringClosure = { Map instruction, checkDoubleQutationMarks={ 
value -> !value.toString().contains('"') } ->
         def buf = new StringBuilder()
         instruction.each { name, value ->
             if (checkDoubleQutationMarks(value)) {

Reply via email to