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 2021/12/22 08:36:39 UTC

[groovy] branch master updated: fix typos and some IDE warnings

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


The following commit(s) were added to refs/heads/master by this push:
     new cf40441  fix typos and some IDE warnings
cf40441 is described below

commit cf40441cb667749df60aa6db7fc60c1e6780a962
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Dec 22 18:36:32 2021 +1000

    fix typos and some IDE warnings
---
 src/main/java/groovy/lang/ListWithDefault.java           |  2 +-
 .../org/codehaus/groovy/classgen/asm/util/TypeUtil.java  |  2 +-
 .../transform/stc/AbstractTypeCheckingExtension.java     |  8 ++++----
 src/spec/doc/_design-pattern-decorator.adoc              |  2 +-
 src/spec/doc/_design-pattern-flyweight.adoc              |  2 +-
 src/spec/doc/_design-pattern-singleton.adoc              |  2 +-
 src/spec/doc/_records.adoc                               |  6 +++---
 src/spec/doc/_sealed.adoc                                |  2 +-
 src/spec/doc/_traits.adoc                                |  6 +++---
 src/spec/doc/_type-checking-extensions.adoc              | 16 ++++++++--------
 src/spec/doc/_working-with-io.adoc                       |  4 ++--
 src/spec/doc/_working-with-numbers.adoc                  |  4 ++--
 .../tools/rootloadersync/SubclassingInJavaTest.java      |  3 ++-
 .../groovy/util/AbstractConcurrentMapSegmentTest.groovy  |  4 ++--
 .../groovy-ant/src/main/java/groovy/ant/AntBuilder.java  |  3 ++-
 .../src/spec/doc/_working-with-datetime-types.adoc       |  2 +-
 .../main/java/groovy/servlet/AbstractHttpServlet.java    |  2 +-
 .../src/spec/doc/_markup-template-engine.adoc            |  4 ++--
 .../AbstractStreamingBuilder.groovy                      |  4 ++--
 19 files changed, 40 insertions(+), 38 deletions(-)

diff --git a/src/main/java/groovy/lang/ListWithDefault.java b/src/main/java/groovy/lang/ListWithDefault.java
index 44afeb8..ca2e7f3 100644
--- a/src/main/java/groovy/lang/ListWithDefault.java
+++ b/src/main/java/groovy/lang/ListWithDefault.java
@@ -90,7 +90,7 @@ public final class ListWithDefault<T> implements List<T> {
     }
 
     @Override
-    public <T> T[] toArray(T[] ts) {
+    public <U> U[] toArray(U[] ts) {
         return delegate.toArray(ts);
     }
 
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java b/src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java
index 3facc44..7686de2 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/util/TypeUtil.java
@@ -110,7 +110,7 @@ public abstract class TypeUtil {
             StringBuilder arrayDescription = new StringBuilder(32);
             Tuple2<ClassNode, Integer> arrayInfo = extractArrayInfo(type);
 
-            for (int i = 0, dimension = arrayInfo.getSecond(); i < dimension; i++) {
+            for (int i = 0, dimension = arrayInfo.getV2(); i < dimension; i++) {
                 arrayDescription.append("[");
             }
 
diff --git a/src/main/java/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java b/src/main/java/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java
index d72a3c0..b0d4af6 100644
--- a/src/main/java/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java
+++ b/src/main/java/org/codehaus/groovy/transform/stc/AbstractTypeCheckingExtension.java
@@ -196,12 +196,12 @@ public class AbstractTypeCheckingExtension extends TypeCheckingExtension {
         if (argTypes.length != classes.length) return false;
         boolean match = true;
         for (int i = 0; i < argTypes.length && match; i++) {
-            match = matchWithOrWithourBoxing(argTypes[i], classes[i]);
+            match = matchWithOrWithoutBoxing(argTypes[i], classes[i]);
         }
         return match;
     }
 
-    private static boolean matchWithOrWithourBoxing(final ClassNode argType, final Class aClass) {
+    private static boolean matchWithOrWithoutBoxing(final ClassNode argType, final Class aClass) {
         final boolean match;
         ClassNode type = ClassHelper.make(aClass);
         if (ClassHelper.isPrimitiveType(type) && !ClassHelper.isPrimitiveType(argType)) {
@@ -224,7 +224,7 @@ public class AbstractTypeCheckingExtension extends TypeCheckingExtension {
         if (argTypes.length<classes.length) return false;
         boolean match = true;
         for (int i = 0; i < classes.length && match; i++) {
-            match = matchWithOrWithourBoxing(argTypes[i], classes[i]);
+            match = matchWithOrWithoutBoxing(argTypes[i], classes[i]);
         }
         return match;
     }
@@ -237,7 +237,7 @@ public class AbstractTypeCheckingExtension extends TypeCheckingExtension {
 
     public boolean argTypeMatches(ClassNode[] argTypes, int index, Class clazz) {
         if (index >= argTypes.length) return false;
-        return matchWithOrWithourBoxing(argTypes[index], clazz);
+        return matchWithOrWithoutBoxing(argTypes[index], clazz);
     }
 
     public boolean argTypeMatches(MethodCall call, int index, Class clazz) {
diff --git a/src/spec/doc/_design-pattern-decorator.adoc b/src/spec/doc/_design-pattern-decorator.adoc
index 0ea7de5..fae2d3c 100644
--- a/src/spec/doc/_design-pattern-decorator.adoc
+++ b/src/spec/doc/_design-pattern-decorator.adoc
@@ -32,7 +32,7 @@ Suppose we have the following `Logger` class.
 include::../test/DesignPatternsTest.groovy[tags=decorator_logger_class,indent=0]
 ----
 
-There might be times when it is useful to timestamp a log message, or times when we might want to change the case of the message. We could try to build all of this functionality into our `Logger` class. If we did that, the `Logger` class would start to be very complex. Also, everyone would obtain all of features even when they might not want a small subset of the features. Finally, feature interaction would become quite difficult to control.
+There might be times when it is useful to timestamp a log message, or times when we might want to change the case of the message. We could try to build all of this functionality into our `Logger` class. If we did that, the `Logger` class would start to be very complex. Also, everyone would obtain all of the features even when they might want only a small subset of the features. Finally, feature interaction would become quite difficult to control.
 
 To overcome these drawbacks, we instead define two decorator classes. Uses of the `Logger` class are free to embellish their base logger with zero or more decorator classes in whatever order they desire. The classes look like this:
 
diff --git a/src/spec/doc/_design-pattern-flyweight.adoc b/src/spec/doc/_design-pattern-flyweight.adoc
index 871149d..2fd89cf 100644
--- a/src/spec/doc/_design-pattern-flyweight.adoc
+++ b/src/spec/doc/_design-pattern-flyweight.adoc
@@ -26,7 +26,7 @@ endif::[]
 
 The http://en.wikipedia.org/wiki/Flyweight_pattern[Flyweight Pattern] is a pattern for greatly reducing memory requirements by not requiring that heavy-weight objects be created in large numbers when dealing with systems that contain many things that are mostly the same. If for instance, a document was modelled using a complex character class that knew about unicode, fonts, positioning, etc., then the memory requirements could be quite large for large documents if each physical character [...]
 
-In such circumstances, we call the state that is shared with many other things (e.g. the character type) __instrinsic__ state. It is captured within the heavy-weight class. The state which distinguishes the physical character (maybe just its ASCII code or Unicode) is called its __extrinsic__ state.
+In such circumstances, we call the state that is shared with many other things (e.g. the character type) __intrinsic__ state. It is captured within the heavy-weight class. The state which distinguishes the physical character (maybe just its ASCII code or Unicode) is called its __extrinsic__ state.
 
 == Example
 
diff --git a/src/spec/doc/_design-pattern-singleton.adoc b/src/spec/doc/_design-pattern-singleton.adoc
index 7c3e4c4..dee5027 100644
--- a/src/spec/doc/_design-pattern-singleton.adoc
+++ b/src/spec/doc/_design-pattern-singleton.adoc
@@ -22,7 +22,7 @@
 = Singleton Pattern
 
 
-The http://en.wikipedia.org/wiki/Singleton_pattern[Singleton Pattern] is used to make sure only one object of a particular class is ever created. This can be useful when when exactly one object is needed to coordinate actions across a system; perhaps for efficiency where creating lots of identical objects would be wasteful, perhaps because a particular algorithm needing a single point of control is required or perhaps when an object is used to interact with a non-shareable resource.
+The http://en.wikipedia.org/wiki/Singleton_pattern[Singleton Pattern] is used to make sure only one object of a particular class is ever created. This can be useful when exactly one object is needed to coordinate actions across a system; perhaps for efficiency where creating lots of identical objects would be wasteful, perhaps because a particular algorithm needing a single point of control is required or perhaps when an object is used to interact with a non-shareable resource.
 
 Weaknesses of the Singleton pattern include:
 
diff --git a/src/spec/doc/_records.adoc b/src/spec/doc/_records.adoc
index 045f9de..9aa8ac8 100644
--- a/src/spec/doc/_records.adoc
+++ b/src/spec/doc/_records.adoc
@@ -88,7 +88,7 @@ include::../test/RecordSpecificationTest.groovy[tags=record_generics_usage,inden
 === Compact constructor
 
 Records have an implicit constructor. This can be overridden in the normal way
-by providing your own constructor - you need to make sure you set all of the fields
+by providing your own constructor - you need to make sure you set all the fields
 if you do this.
 However, for succinctness, a compact constructor syntax can be used where
 the parameter declaration part of a normal constructor is elided.
@@ -258,7 +258,7 @@ You can use `@RecordOptions(getAt=false)` to disable this feature.
 It can be useful to make a copy of a record with some components changed.
 This can be done using an optional `copyWith` method which takes named arguments.
 Record components are set from the supplied arguments.
-For components not mentioned, a (shallow) copy of the original record commponent is used.
+For components not mentioned, a (shallow) copy of the original record component is used.
 Here is how you might use `copyWith` for the `Fruit` record:
 
 [source,groovy]
@@ -280,7 +280,7 @@ data types. Records can make use of this defensive copying to gain deep immutabi
 include::../test/RecordSpecificationTest.groovy[tags=record_immutable,indent=0]
 ----
 
-These examples illustrates the principal behind
+These examples illustrate the principal behind
 Groovy's record feature offering three levels of convenience:
 
 * Using the `record` keyword for maximum succinctness
diff --git a/src/spec/doc/_sealed.adoc b/src/spec/doc/_sealed.adoc
index 11c0606..a647664 100644
--- a/src/spec/doc/_sealed.adoc
+++ b/src/spec/doc/_sealed.adoc
@@ -83,7 +83,7 @@ include::../test/SealedSpecificationTest.groovy[tags=general_sealed_class_annota
 In this example, our permitted subclasses for `Shape` are `Circle`, `Polygon`, and `Rectangle`.
 `Circle` is `final` and hence that part of the hierarchy cannot be extended.
 `Polygon` is implicitly non-sealed and `RegularPolygon` is explicitly marked as `non-sealed`.
-That means our heiarchy is open to any further extension by subclassing,
+That means our hierarchy is open to any further extension by subclassing,
 as seen with `Polygon -> RegularPolygon` and `RegularPolygon -> Hexagon`.
 `Rectangle` is itself sealed which means that part of the hierarchy can be extended
 but only in a controlled way (only `Square` is permitted).
diff --git a/src/spec/doc/_traits.adoc b/src/spec/doc/_traits.adoc
index eedbb55..d165755 100644
--- a/src/spec/doc/_traits.adoc
+++ b/src/spec/doc/_traits.adoc
@@ -301,11 +301,11 @@ include::../test/TraitsSpecificationTest.groovy[tags=dynamicobject,indent=0]
 <2> the `Dynamic` class defines a property
 <3> the `Dynamic` class defines a method
 <4> calling an existing property will call the method from `Dynamic`
-<5> calling an non-existing property will call the method from the trait
+<5> calling a non-existing property will call the method from the trait
 <6> will call `setProperty` defined on the trait
 <7> will call `getProperty` defined on the trait
 <8> calling an existing method on `Dynamic`
-<9> but calling a non existing method thanks to the trait `methodMissing`
+<9> but calling a non-existing method thanks to the trait `methodMissing`
 
 == Multiple inheritance conflicts
 === Default conflict resolution
@@ -576,7 +576,7 @@ an implementation for a default method, then the implementation from the interfa
 with a major difference: the implementation from the trait is *always* used if the class declares the trait in its interface
 list *and* that it doesn't provide an implementation *even* if a super class does.
 
-This feature can be used to compose behaviors in an very precise way, in case you want to override the behavior of an
+This feature can be used to compose behaviors in a very precise way, in case you want to override the behavior of an
 already implemented method.
 
 To illustrate the concept, let's start with this simple example:
diff --git a/src/spec/doc/_type-checking-extensions.adoc b/src/spec/doc/_type-checking-extensions.adoc
index 3bcc6a0..16d7eeb 100644
--- a/src/spec/doc/_type-checking-extensions.adoc
+++ b/src/spec/doc/_type-checking-extensions.adoc
@@ -424,8 +424,8 @@ include::../test-resources/beforevisitmethod.groovy[tags=event,indent=0]
 The type checker will call this method before
 starting to type check a method body. If you want, for example, to
 perform type checking by yourself instead of letting the type checker do
-it, you have to set the handled flag to true.This event can also be used
-to help defining the scope of your extension (for example, applying it
+it, you have to set the handled flag to true. This event can also be used
+to help define the scope of your extension (for example, applying it
 only if you are inside method foo).
 |===
 
@@ -506,8 +506,8 @@ inner/anonymous class defined in the same class with is not skipped.
 | incompatibleAssignment
 | *Called When*
 | Called when the type checker thinks
-    that an assignment is incorrect, meaning that the right hand side of an
-    assignment is incompatible with the left hand side
+    that an assignment is incorrect, meaning that the right-hand side of an
+    assignment is incompatible with the left-hand side
 | *Arguments*
 | ClassNode lhsType, ClassNode rhsType,  Expression assignment
 | *Usage*
@@ -758,7 +758,7 @@ builder.foo {
 -------------
 
 Your extension, then, should only be active once you’ve entered
-the `foo` method, and inactive outside of this scope. But you could have
+the `foo` method, and inactive outside this scope. But you could have
 complex situations like multiple builders in the same file or embedded
 builders (builders in builders). While you should not try to fix all
 this from start (you must accept limitations to type checking), the type
@@ -923,7 +923,7 @@ The more advanced one is to use <<ast-xform-as-extension,AST transformations dur
 complex.
 
 Type checking extensions allow you to help the type checker where it
-fails, but it also allow you to fail where it doesn’t. In that context,
+fails, but it also allows you to fail where it doesn’t. In that context,
 it makes sense to support extensions for `@CompileStatic` too. Imagine
 an extension that is capable of type checking SQL queries. In that case,
 the extension would be valid in both dynamic and static context, because
@@ -933,7 +933,7 @@ without the extension, the code would still pass.
 === Mixed mode compilation
 
 In the previous section, we highlighted the fact that you can activate type checking extensions with
-`@CompileStatic`. In that context, the type checker would not complain anymore about some unresolved variables or
+`@CompileStatic`. In that context, the type checker would not complain any more about some unresolved variables or
 unknown method calls, but it would still wouldn't know how to compile them statically.
 
 Mixed mode compilation offers a third way, which is to instruct the compiler that whenever an unresolved variable
@@ -1032,7 +1032,7 @@ The `makeDynamic` call does 3 things:
 * but also marks the `call` to be done dynamically
 
 So when the compiler will have to generate bytecode for the call to `move`, since it is now marked as a dynamic call,
-it will fallback to the dynamic compiler and let it handle the call. And since the extension tells us that the return
+it will fall back to the dynamic compiler and let it handle the call. And since the extension tells us that the return
 type of the dynamic call is a `Robot`, subsequent calls will be done statically!
 
 Some would wonder why the static compiler doesn't do this by default without an extension. It is a design decision:
diff --git a/src/spec/doc/_working-with-io.adoc b/src/spec/doc/_working-with-io.adoc
index ffce22c..91ebc2a 100644
--- a/src/spec/doc/_working-with-io.adoc
+++ b/src/spec/doc/_working-with-io.adoc
@@ -190,7 +190,7 @@ serialize data into a file and deserialize it using this code:
 include::../test/gdk/WorkingWithIOSpecTest.groovy[tags=data_in_out,indent=0]
 ----
 
-And similarily, if the data you want to serialize implements the `Serializable` interface, you can proceed with
+And similarly, if the data you want to serialize implements the `Serializable` interface, you can proceed with
 an object output stream, as illustrated here:
 
 [source,groovy]
@@ -206,7 +206,7 @@ like system administration or devops it is often required to communicate with ex
 
 Groovy provides a simple way to execute command line processes. Simply
 write the command line as a string and call the `execute()` method.
-E.g., on a *nix machine (or a windows machine with appropriate *nix
+E.g., on a *nix machine (or a Windows machine with appropriate *nix
 commands installed), you can execute this:
 
 [source,groovy]
diff --git a/src/spec/doc/_working-with-numbers.adoc b/src/spec/doc/_working-with-numbers.adoc
index 96deeaa..a3786fa 100644
--- a/src/spec/doc/_working-with-numbers.adoc
+++ b/src/spec/doc/_working-with-numbers.adoc
@@ -106,14 +106,14 @@ include::../test/SyntaxTest.groovy[tags=float_decl,indent=0]
 ----
 
 Decimals can use exponents, with the `e` or `E` exponent letter, followed by an optional sign,
-and a integral number representing the exponent:
+and an integral number representing the exponent:
 
 [source,groovy]
 ----
 include::../test/SyntaxTest.groovy[tags=float_exp,indent=0]
 ----
 
-Conveniently for exact decimal number calculations, Groovy choses `java.math.BigDecimal` as its decimal number type.
+Conveniently for exact decimal number calculations, Groovy chooses `java.math.BigDecimal` as its decimal number type.
 In addition, both `float` and `double` are supported, but require an explicit type declaration, type coercion or suffix.
 Even if `BigDecimal` is the default for decimal numbers, such literals are accepted in methods or closures taking `float` or `double` as parameter types.
 
diff --git a/src/test/org/codehaus/groovy/tools/rootloadersync/SubclassingInJavaTest.java b/src/test/org/codehaus/groovy/tools/rootloadersync/SubclassingInJavaTest.java
index 3276c60..f8a99e8 100644
--- a/src/test/org/codehaus/groovy/tools/rootloadersync/SubclassingInJavaTest.java
+++ b/src/test/org/codehaus/groovy/tools/rootloadersync/SubclassingInJavaTest.java
@@ -20,7 +20,8 @@ package org.codehaus.groovy.tools.rootloadersync;
 
 import org.junit.Test;
 import java.util.HashSet;
-import static junit.framework.Assert.assertEquals;
+
+import static org.junit.Assert.assertEquals;
 
 
 public class SubclassingInJavaTest {
diff --git a/src/test/org/codehaus/groovy/util/AbstractConcurrentMapSegmentTest.groovy b/src/test/org/codehaus/groovy/util/AbstractConcurrentMapSegmentTest.groovy
index 4f275f5..97848eb 100644
--- a/src/test/org/codehaus/groovy/util/AbstractConcurrentMapSegmentTest.groovy
+++ b/src/test/org/codehaus/groovy/util/AbstractConcurrentMapSegmentTest.groovy
@@ -111,9 +111,9 @@ class AbstractConcurrentMapSegmentTest {
     }
 
     private void whenISetElementsAsInvalid(int count) {
-        List<TestEntry> validEntires = entries.findAll { it.isValid() }
+        List<TestEntry> validEntries = entries.findAll { it.isValid() }
         count.times {
-            validEntires.get(it).setValid(false)
+            validEntries.get(it).setValid(false)
         }
     }
 
diff --git a/subprojects/groovy-ant/src/main/java/groovy/ant/AntBuilder.java b/subprojects/groovy-ant/src/main/java/groovy/ant/AntBuilder.java
index 905f3a2..98af23a 100644
--- a/subprojects/groovy-ant/src/main/java/groovy/ant/AntBuilder.java
+++ b/subprojects/groovy-ant/src/main/java/groovy/ant/AntBuilder.java
@@ -26,6 +26,7 @@ import org.apache.tools.ant.BuildLogger;
 import org.apache.tools.ant.DemuxInputStream;
 import org.apache.tools.ant.DemuxOutputStream;
 import org.apache.tools.ant.Location;
+import org.apache.tools.ant.MagicNames;
 import org.apache.tools.ant.NoBannerLogger;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectHelper;
@@ -187,7 +188,7 @@ public class AntBuilder extends BuilderSupport {
         final Project project = new Project();
 
         final ProjectHelper helper = ProjectHelper.getProjectHelper();
-        project.addReference(ProjectHelper.PROJECTHELPER_REFERENCE, helper);
+        project.addReference(MagicNames.REFID_PROJECT_HELPER, helper);
         helper.getImportStack().addElement("AntBuilder"); // import checks that stack is not empty
 
         final BuildLogger logger = new NoBannerLogger();
diff --git a/subprojects/groovy-datetime/src/spec/doc/_working-with-datetime-types.adoc b/subprojects/groovy-datetime/src/spec/doc/_working-with-datetime-types.adoc
index 05b2daa..5483cdc 100644
--- a/subprojects/groovy-datetime/src/spec/doc/_working-with-datetime-types.adoc
+++ b/subprojects/groovy-datetime/src/spec/doc/_working-with-datetime-types.adoc
@@ -305,7 +305,7 @@ include::../test/gdk/WorkingWithDateTimeTypesTest.groovy[tags=rightshift_operato
 == Converting between legacy and JSR 310 types
 
 Despite the shortcomings of `Date`, `Calendar`, and `TimeZone` types in the `java.util` package
-they are farily common in Java APIs (at least in those prior to Java 8).
+they are fairly common in Java APIs (at least in those prior to Java 8).
 To accommodate use of such APIs, Groovy provides methods for converting between the
 JSR 310 types and legacy types.
 
diff --git a/subprojects/groovy-servlet/src/main/java/groovy/servlet/AbstractHttpServlet.java b/subprojects/groovy-servlet/src/main/java/groovy/servlet/AbstractHttpServlet.java
index 0474a96..d6c1f87 100644
--- a/subprojects/groovy-servlet/src/main/java/groovy/servlet/AbstractHttpServlet.java
+++ b/subprojects/groovy-servlet/src/main/java/groovy/servlet/AbstractHttpServlet.java
@@ -194,7 +194,7 @@ public abstract class AbstractHttpServlet extends HttpServlet implements Resourc
         if (namePrefix == null) {
             generateNamePrefixOnce();
         }
-        if (name.startsWith(namePrefix)) {//usualy name has text
+        if (name.startsWith(namePrefix)) { // usually name has text
             return name.substring(namePrefix.length());
         }
         return name;
diff --git a/subprojects/groovy-templates/src/spec/doc/_markup-template-engine.adoc b/subprojects/groovy-templates/src/spec/doc/_markup-template-engine.adoc
index 1045823..5a5b405 100644
--- a/subprojects/groovy-templates/src/spec/doc/_markup-template-engine.adoc
+++ b/subprojects/groovy-templates/src/spec/doc/_markup-template-engine.adoc
@@ -640,7 +640,7 @@ generates a string which is streamed to the output, then the `a` link is generat
 call is streamed, leading in an execution *in order*. But with the string version above, the order of execution is different:
 
 * the `yield` call requires an argument, a _string_
-* that arguments needs to be evaluated _before_ the _yield_ call is generated
+* that arguments need to be evaluated _before_ the _yield_ call is generated
 
 so evaluating the string leads to an execution of the `a(href:...)` call *before* `yield` is itself called. This is not
 what you want to do. Instead, you want to generate a _string_ which contains markup, which is then passed to the `yield`
@@ -715,7 +715,7 @@ However, changing the default locale of the template engine to `Locale.FRANCE` w
 with the `fr_FR` locale:
 
 [source,html]
-.Don't fallback to the default template because a locale specific template was found
+.Don't fall back to the default template because a locale specific template was found
 ----
 include::../test/MarkupTemplateEngineSpecTest.groovy[tags=locale_implicit_import_expected2,indent=0]
 ----
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 f2a7b16..1608085 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
@@ -62,10 +62,10 @@ class AbstractStreamingBuilder {
     }
     def getNamespaceClosure = { doc, pendingNamespaces, namespaces, Object[] rest -> [namespaces, pendingNamespaces] }
 
-    def toMapStringClosure = { Map instruction, checkDoubleQutationMarks={ value -> !value.toString().contains('"') } ->
+    def toMapStringClosure = { Map instruction, checkDoubleQuotationMarks={ value -> !value.toString().contains('"') } ->
         def buf = new StringBuilder()
         instruction.each { name, value ->
-            if (checkDoubleQutationMarks(value)) {
+            if (checkDoubleQuotationMarks(value)) {
                 buf.append(" $name=\"$value\"")
             } else {
                 buf.append(" $name='$value'")