groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy] 05/06: minor refactor: remove javadoc warnings (cont'd 2)
Date Sat, 27 Apr 2019 09:50:58 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit b64ff97ffd0a12b3a66f66e6d9213d28f0da1656
Author: Paul King <paulk@asert.com.au>
AuthorDate: Sat Apr 27 17:15:53 2019 +1000

    minor refactor: remove javadoc warnings (cont'd 2)
---
 gradle/docs.gradle                                 |   5 +
 src/main/groovy/groovy/transform/AutoFinal.java    |   4 +-
 .../groovy/groovy/transform/EqualsAndHashCode.java |  16 +-
 src/main/groovy/groovy/transform/Memoized.java     |   2 +-
 .../groovy/transform/stc/MapEntryOrKeyValue.java   |   6 +-
 .../groovy/transform/stc/PickAnyArgumentHint.java  |   2 +-
 src/main/groovy/groovy/util/IndentPrinter.java     |   2 +-
 .../groovy/ast/tools/WideningCategories.java       |   2 +-
 .../groovy/runtime/DefaultGroovyMethods.java       | 356 +++++++++++----------
 .../codehaus/groovy/runtime/IOGroovyMethods.java   |   4 +-
 .../groovy/runtime/ResourceGroovyMethods.java      |  16 +-
 .../groovy/runtime/StringGroovyMethods.java        |  44 +--
 .../java/org/codehaus/groovy/tools/RootLoader.java |  15 +-
 .../transform/stc/StaticTypeCheckingSupport.java   |   2 +-
 14 files changed, 247 insertions(+), 229 deletions(-)

diff --git a/gradle/docs.gradle b/gradle/docs.gradle
index d8d3c66..1e1c260 100644
--- a/gradle/docs.gradle
+++ b/gradle/docs.gradle
@@ -76,6 +76,10 @@ allprojects {
     groovydoc groovydocSpec
 }
 
+javadoc {
+    exclude '**/GroovyRecognizer.java' // generated file
+}
+
 evaluationDependsOn('groovy-jaxb')
 
 // Root project has an extra 'all' javadoc task
@@ -88,6 +92,7 @@ javadocAll {
         source += sp.javadoc.source
         classpath += sp.javadoc.classpath
     }
+    exclude '**/GroovyRecognizer.java' // generated file
 }
 javadocAll javadocSpec
 
diff --git a/src/main/groovy/groovy/transform/AutoFinal.java b/src/main/groovy/groovy/transform/AutoFinal.java
index 58ce3ba..cd1d9c8 100644
--- a/src/main/groovy/groovy/transform/AutoFinal.java
+++ b/src/main/groovy/groovy/transform/AutoFinal.java
@@ -53,7 +53,7 @@ import java.lang.annotation.Target;
  *         this.last = last
  *     }
  *     String fullName(boolean reversed = false, String separator = ' ') {
- *         final concatCls = { String n0, String n1 -> "$n0$separator$n1" }
+ *         final concatCls = { String n0, String n1 {@code ->} "$n0$separator$n1" }
  *         concatCls(reversed ? last : first, reversed ? first : last)
  *     }
  * }
@@ -77,7 +77,7 @@ import java.lang.annotation.Target;
  * </pre>
  * and the closure will have become:
  * <pre>
- * { final String n0, final String n1 -> "$n0$separator$n1" }
+ * { final String n0, final String n1 {@code ->} "$n0$separator$n1" }
  * </pre>
  *
  * @since 2.5.0
diff --git a/src/main/groovy/groovy/transform/EqualsAndHashCode.java b/src/main/groovy/groovy/transform/EqualsAndHashCode.java
index 51e480d..20e0783 100644
--- a/src/main/groovy/groovy/transform/EqualsAndHashCode.java
+++ b/src/main/groovy/groovy/transform/EqualsAndHashCode.java
@@ -99,9 +99,9 @@ import java.lang.annotation.Target;
  *
  * def p3 = new IntPairWithSum(1, 2)
  *
- * assert p1 == p2 && p2 == p1
- * assert p1 == p3 && p3 == p1
- * assert p3 == p2 && p2 == p3
+ * assert p1 == p2 {@code &&} p2 == p1
+ * assert p1 == p3 {@code &&} p3 == p1
+ * assert p3 == p2 {@code &&} p2 == p3
  * </pre>
  * Note that if you create any domain classes which don't have exactly the
  * same contract as <code>IntPair</code> then you should provide an appropriate
@@ -113,7 +113,7 @@ import java.lang.annotation.Target;
  * {@code @TupleConstructor(includeSuperProperties=true)}
  * class IntTriple extends IntPair { int z }
  * def t1 = new IntTriple(1, 2, 3)
- * assert p1 != t1 && p2 != t1 && t1 != p3
+ * assert p1 != t1 {@code &&} p2 != t1 {@code &&} t1 != p3
  * </pre>
  *
  * The alternative supported style regards any kind of inheritance as creation of
@@ -150,13 +150,13 @@ import java.lang.annotation.Target;
  * e.g. for comparing instances of the <code>IntPair</code> and <code>IntTriple</code> classes
  * discussed earlier, you could provide the following method in <code>IntPair</code>:
  * <pre>
- * boolean hasEqualXY(other) { other.x == getX() && other.y == getY() }
+ * boolean hasEqualXY(other) { other.x == getX() {@code &&} other.y == getY() }
  * </pre>
  * Then for the objects defined earlier, the following would be true:
  * <pre>
- * assert p1.hasEqualXY(t1) && t1.hasEqualXY(p1)
- * assert p2.hasEqualXY(t1) && t1.hasEqualXY(p2)
- * assert p3.hasEqualXY(t1) && t1.hasEqualXY(p3)
+ * assert p1.hasEqualXY(t1) {@code &&} t1.hasEqualXY(p1)
+ * assert p2.hasEqualXY(t1) {@code &&} t1.hasEqualXY(p2)
+ * assert p3.hasEqualXY(t1) {@code &&} t1.hasEqualXY(p3)
  * </pre>
  * There is also support for including or excluding fields/properties by name when constructing
  * the equals and hashCode methods as shown here:
diff --git a/src/main/groovy/groovy/transform/Memoized.java b/src/main/groovy/groovy/transform/Memoized.java
index 5bd1dc1..051cd81 100644
--- a/src/main/groovy/groovy/transform/Memoized.java
+++ b/src/main/groovy/groovy/transform/Memoized.java
@@ -49,7 +49,7 @@ import java.lang.annotation.Target;
  * <pre>
  * class MemoizedExample {
  * 
- *     private final Closure memoizedSum = { int n1, int n2 ->
+ *     private final Closure memoizedSum = { int n1, int n2 {@code ->}
  *         private$method$memoizedSum(n1,n2)
  *     }.memoize()
  * 
diff --git a/src/main/groovy/groovy/transform/stc/MapEntryOrKeyValue.java b/src/main/groovy/groovy/transform/stc/MapEntryOrKeyValue.java
index 9316ef8..a53d14e 100644
--- a/src/main/groovy/groovy/transform/stc/MapEntryOrKeyValue.java
+++ b/src/main/groovy/groovy/transform/stc/MapEntryOrKeyValue.java
@@ -37,9 +37,9 @@ import java.util.Map;
  * or on a key,value pair.</p>
  * <p>The result is a closure which can have the following forms:</p>
  * <ul>
- *     <li><code>{ key, value -> ...}</code> where key is the key of a map entry, and value the corresponding value</li>
- *     <li><code>{ entry -> ... }</code> where entry is a {@link java.util.Map.Entry} map entry</li>
- *     <li><code>{ ...}</code> where <i>it</i> is an implicit {@link java.util.Map.Entry} map entry</li>
+ *     <li><code>{ key, value {@code ->} ... }</code> where key is the key of a map entry, and value the corresponding value</li>
+ *     <li><code>{ entry {@code ->} ... }</code> where entry is a {@link java.util.Map.Entry} map entry</li>
+ *     <li><code>{ ... }</code> where <i>it</i> is an implicit {@link java.util.Map.Entry} map entry</li>
  * </ul>
  * <p>This hint handles all those cases by picking the generics from the first argument of the method (by default).</p>
  * <p>The options array is used to modify the behavior of this hint. Each string in the option array consists of
diff --git a/src/main/groovy/groovy/transform/stc/PickAnyArgumentHint.java b/src/main/groovy/groovy/transform/stc/PickAnyArgumentHint.java
index 0f4d92f..34b58f0 100644
--- a/src/main/groovy/groovy/transform/stc/PickAnyArgumentHint.java
+++ b/src/main/groovy/groovy/transform/stc/PickAnyArgumentHint.java
@@ -29,7 +29,7 @@ import org.codehaus.groovy.control.SourceUnit;
  * This can optionally use a generic type of the selected parameter as the hint. For example, imagine the following
  * method:</p>
  * <code>void foo(A firstArg, B secondArg, Closure c) {...}</code>
- * <p>If the <i>c</i> closure should be <code>{ B it -> ...}</code>, then we can see that the parameter type
+ * <p>If the <i>c</i> closure should be <code>{ B it {@code ->} ...}</code>, then we can see that the parameter type
  * should be picked from the second parameter of the foo method, which is what {@link groovy.transform.stc.PickAnyArgumentHint}
  * lets you do.</p>
  * <p>Alternatively, the method may look like this:</p>
diff --git a/src/main/groovy/groovy/util/IndentPrinter.java b/src/main/groovy/groovy/util/IndentPrinter.java
index ccbec0f..e79d4bb 100644
--- a/src/main/groovy/groovy/util/IndentPrinter.java
+++ b/src/main/groovy/groovy/util/IndentPrinter.java
@@ -36,7 +36,7 @@ import java.io.Writer;
  * The following is an example usage. Note that within a "with" block you need to
  * specify a parameter name so that this.println is not called instead of IndentPrinter.println:
  * <pre>
- * new IndentPrinter(new PrintWriter(out)).with { p ->
+ * new IndentPrinter(new PrintWriter(out)).with { p {@code ->}
  *     p.printIndent()
  *     p.println('parent1')
  *     p.incrementIndent()
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java b/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
index 2e4f71d..4f3bba6 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
@@ -583,7 +583,7 @@ public class WideningCategories {
     /**
      * This {@link ClassNode} specialization is used when the lowest upper bound of two types
      * cannot be represented by an existing type. For example, if B extends A,  C extends A
-     * and both C & B implement a common interface not implemented by A, then we use this class
+     * and both C and B implement a common interface not implemented by A, then we use this class
      * to represent the bound.
      *
      * At compile time, some classes like {@link org.codehaus.groovy.classgen.AsmClassGenerator} need
diff --git a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
index 8d6097f..a86a819 100644
--- a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
@@ -1061,7 +1061,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self any Object
      * @return a String that matches what would be typed into a terminal to
-     *         create this object. e.g. [1, 'hello'].inspect() -> [1, "hello"]
+     *         create this object. e.g. [1, 'hello'].inspect() {@code ->} [1, "hello"]
      * @since 1.0
      */
     public static String inspect(Object self) {
@@ -1375,7 +1375,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * will be passed as arguments, and the closure should return an
      * int value (with 0 indicating the items are not unique).
      * <pre class="groovyTestCase">assert [1,4] == [1,3,4,5].unique { it % 2 }</pre>
-     * <pre class="groovyTestCase">assert [2,3,4] == [2,3,3,4].unique { a, b -> a <=> b }</pre>
+     * <pre class="groovyTestCase">assert [2,3,4] == [2,3,3,4].unique { a, b {@code ->} a {@code <=>} b }</pre>
      *
      * @param self    a Collection
      * @param closure a 1 or 2 arg Closure used to determine unique items
@@ -1399,7 +1399,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * will be passed as arguments, and the closure should return an
      * int value (with 0 indicating the items are not unique).
      * <pre class="groovyTestCase">assert [1,4] == [1,3,4,5].unique { it % 2 }</pre>
-     * <pre class="groovyTestCase">assert [2,3,4] == [2,3,3,4].unique { a, b -> a <=> b }</pre>
+     * <pre class="groovyTestCase">assert [2,3,4] == [2,3,3,4].unique { a, b {@code ->} a {@code <=>} b }</pre>
      *
      * @param self    a List
      * @param closure a 1 or 2 arg Closure used to determine unique items
@@ -1427,7 +1427,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * </pre>
      * <pre class="groovyTestCase">
      * def orig = [2, 3, 3, 4]
-     * def uniq = orig.unique(false) { a, b -> a <=> b }
+     * def uniq = orig.unique(false) { a, b {@code ->} a {@code <=>} b }
      * assert orig == [2, 3, 3, 4]
      * assert uniq == [2, 3, 4]
      * </pre>
@@ -1465,7 +1465,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * </pre>
      * <pre class="groovyTestCase">
      * def orig = [2, 3, 3, 4]
-     * def uniq = orig.unique(false) { a, b -> a <=> b }
+     * def uniq = orig.unique(false) { a, b {@code ->} a {@code <=>} b }
      * assert orig == [2, 3, 3, 4]
      * assert uniq == [2, 3, 4]
      * </pre>
@@ -1545,7 +1545,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * def list = [a, b, c, d]
      * List list2 = list.unique(new PersonComparator())
-     * assert( list2 == list && list == [a, b, c] )
+     * assert( list2 == list {@code &&} list == [a, b, c] )
      * </pre>
      *
      * @param self       a Collection
@@ -1596,7 +1596,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * def list = [a, b, c, d]
      * List list2 = list.unique(new PersonComparator())
-     * assert( list2 == list && list == [a, b, c] )
+     * assert( list2 == list {@code &&} list == [a, b, c] )
      * </pre>
      *
      * @param self       a List
@@ -1647,7 +1647,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * def list = [a, b, c, d]
      * List list2 = list.unique(false, new PersonComparator())
-     * assert( list2 != list && list2 == [a, b, c] )
+     * assert( list2 != list {@code &&} list2 == [a, b, c] )
      * </pre>
      *
      * @param self       a Collection
@@ -1719,7 +1719,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * def list = [a, b, c, d]
      * List list2 = list.unique(false, new PersonComparator())
-     * assert( list2 != list && list2 == [a, b, c] )
+     * assert( list2 != list {@code &&} list2 == [a, b, c] )
      * </pre>
      *
      * @param self       a List
@@ -1749,7 +1749,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * assert noDups == ['H', 'e', 'l', 'o', null, 't', 'r']
      * </pre>
      * <pre class="groovyTestCase">assert [1,4] == [1,3,4,5].toUnique { it % 2 }</pre>
-     * <pre class="groovyTestCase">assert [2,3,4] == [2,3,3,4].toUnique { a, b -> a <=> b }</pre>
+     * <pre class="groovyTestCase">assert [2,3,4] == [2,3,3,4].toUnique { a, b {@code ->} a {@code <=>} b }</pre>
      *
      * @param self an Iterator
      * @param condition a Closure used to determine unique items
@@ -1864,7 +1864,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * def list = [a, b, c, d]
      * List list2 = list.toUnique(new PersonComparator())
-     * assert list2 == [a, b, c] && list == [a, b, c, d]
+     * assert list2 == [a, b, c] {@code &&} list == [a, b, c, d]
      * </pre>
      *
      * @param self       an Iterable
@@ -1915,7 +1915,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * def list = [a, b, c, d]
      * List list2 = list.toUnique(new PersonComparator())
-     * assert list2 == [a, b, c] && list == [a, b, c, d]
+     * assert list2 == [a, b, c] {@code &&} list == [a, b, c, d]
      * </pre>
      *
      * @param self       a List
@@ -1989,10 +1989,10 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Person d = new Person(fname:"Clark", lname:"Taylor")
      *
      * def list = [a, b, c, d]
-     * def list2 = list.toUnique{ p1, p2 -> p1.lname != p2.lname ? p1.lname &lt;=&gt; p2.lname : p1.fname &lt;=&gt; p2.fname }
-     * assert( list2 == [a, b, c] && list == [a, b, c, d] )
+     * def list2 = list.toUnique{ p1, p2 {@code ->} p1.lname != p2.lname ? p1.lname &lt;=&gt; p2.lname : p1.fname &lt;=&gt; p2.fname }
+     * assert( list2 == [a, b, c] {@code &&} list == [a, b, c, d] )
      * def list3 = list.toUnique{ it.toString() }
-     * assert( list3 == [a, b, c] && list == [a, b, c, d] )
+     * assert( list3 == [a, b, c] {@code &&} list == [a, b, c, d] )
      * </pre>
      *
      * @param self      an Iterable
@@ -2033,10 +2033,10 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Person d = new Person(fname:"Clark", lname:"Taylor")
      *
      * def list = [a, b, c, d]
-     * def list2 = list.toUnique{ p1, p2 -> p1.lname != p2.lname ? p1.lname &lt;=&gt; p2.lname : p1.fname &lt;=&gt; p2.fname }
-     * assert( list2 == [a, b, c] && list == [a, b, c, d] )
+     * def list2 = list.toUnique{ p1, p2 {@code ->} p1.lname != p2.lname ? p1.lname &lt;=&gt; p2.lname : p1.fname &lt;=&gt; p2.fname }
+     * assert( list2 == [a, b, c] {@code &&} list == [a, b, c, d] )
      * def list3 = list.toUnique{ it.toString() }
-     * assert( list3 == [a, b, c] && list == [a, b, c, d] )
+     * assert( list3 == [a, b, c] {@code &&} list == [a, b, c, d] )
      * </pre>
      *
      * @param self      a List
@@ -2057,7 +2057,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * String[] letters = ['c', 'a', 't', 's', 'A', 't', 'h', 'a', 'T']
      * String[] lower = ['c', 'a', 't', 's', 'h']
      * class LowerComparator implements Comparator {
-     *     int compare(let1, let2) { let1.toLowerCase() <=> let2.toLowerCase() }
+     *     int compare(let1, let2) { let1.toLowerCase() {@code <=>} let2.toLowerCase() }
      * }
      * assert letters.toUnique(new LowerComparator()) == lower
      * </pre>
@@ -2101,7 +2101,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      * String[] letters = ['c', 'a', 't', 's', 'A', 't', 'h', 'a', 'T']
      * String[] expected = ['c', 'a', 't', 's', 'h']
-     * assert letters.toUnique{ p1, p2 -> p1.toLowerCase() <=> p2.toLowerCase() } == expected
+     * assert letters.toUnique{ p1, p2 {@code ->} p1.toLowerCase() {@code <=>} p2.toLowerCase() } == expected
      * assert letters.toUnique{ it.toLowerCase() } == expected
      * </pre>
      *
@@ -2166,7 +2166,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      * String[] letters = ['a', 'b', 'c']
      * String result = ''
-     * letters.eachWithIndex{ letter, index -> result += "$index:$letter" }
+     * letters.eachWithIndex{ letter, index {@code ->} result += "$index:$letter" }
      * assert result == '0:a1:b2:c'
      * </pre>
      *
@@ -2192,7 +2192,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * zero) to the given closure.
      * <pre class="groovyTestCase">
      * String result = ''
-     * ['a', 'b', 'c'].eachWithIndex{ letter, index -> result += "$index:$letter" }
+     * ['a', 'b', 'c'].eachWithIndex{ letter, index {@code ->} result += "$index:$letter" }
      * assert result == '0:a1:b2:c'
      * </pre>
      *
@@ -2386,10 +2386,10 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * otherwise if the closure takes two parameters then it will be
      * passed the key and the value.
      * <pre class="groovyTestCase">def result = ""
-     * [a:1, b:3].each { key, value -> result += "$key$value" }
+     * [a:1, b:3].each { key, value {@code ->} result += "$key$value" }
      * assert result == "a1b3"</pre>
      * <pre class="groovyTestCase">def result = ""
-     * [a:1, b:3].each { entry -> result += entry }
+     * [a:1, b:3].each { entry {@code ->} result += entry }
      * assert result == "a=1b=3"</pre>
      *
      * In general, the order in which the map contents are processed
@@ -2438,10 +2438,10 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * takes three parameters then it will be passed the key, the value, and
      * the index.
      * <pre class="groovyTestCase">def result = ""
-     * [a:1, b:3].eachWithIndex { key, value, index -> result += "$index($key$value)" }
+     * [a:1, b:3].eachWithIndex { key, value, index {@code ->} result += "$index($key$value)" }
      * assert result == "0(a1)1(b3)"</pre>
      * <pre class="groovyTestCase">def result = ""
-     * [a:1, b:3].eachWithIndex { entry, index -> result += "$index($entry)" }
+     * [a:1, b:3].eachWithIndex { entry, index {@code ->} result += "$index($entry)" }
      * assert result == "0(a=1)1(b=3)"</pre>
      *
      * @param self    the map over which we iterate
@@ -2491,7 +2491,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <code>true</code> for all items in this data structure).
      * A simple example for a list:
      * <pre>def list = [3,4,5]
-     * def greaterThanTwo = list.every { it > 2 }
+     * def greaterThanTwo = list.every { it {@code >} 2 }
      * </pre>
      *
      * @param self      the object over which we iterate
@@ -2508,7 +2508,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <code>true</code> for all items in this iterator).
      * A simple example for a list:
      * <pre>def list = [3,4,5]
-     * def greaterThanTwo = list.iterator().every { it > 2 }
+     * def greaterThanTwo = list.iterator().every { it {@code >} 2 }
      * </pre>
      *
      * @param self      the iterator over which we iterate
@@ -2544,7 +2544,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <code>true</code> for all items in this iterable).
      * A simple example for a list:
      * <pre>def list = [3,4,5]
-     * def greaterThanTwo = list.every { it > 2 }
+     * def greaterThanTwo = list.every { it {@code >} 2 }
      * </pre>
      *
      * @param self      the iterable over which we iterate
@@ -2563,8 +2563,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * otherwise if the closure takes two parameters then it will be
      * passed the key and the value.
      * <pre class="groovyTestCase">def map = [a:1, b:2.0, c:2L]
-     * assert !map.every { key, value -> value instanceof Integer }
-     * assert map.every { entry -> entry.value instanceof Number }</pre>
+     * assert !map.every { key, value {@code ->} value instanceof Integer }
+     * assert map.every { entry {@code ->} entry.value instanceof Number }</pre>
      *
      * @param self      the map over which we iterate
      * @param predicate the 1 or 2 arg Closure predicate used for matching
@@ -2584,7 +2584,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Iterates over every element of a collection, and checks whether all
      * elements are <code>true</code> according to the Groovy Truth.
-     * Equivalent to <code>self.every({element -> element})</code>
+     * Equivalent to <code>self.every({element {@code ->} element})</code>
      * <pre class="groovyTestCase">
      * assert [true, true].every()
      * assert [1, 1].every()
@@ -2610,7 +2610,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * predicate is valid for at least one element.
      * <pre class="groovyTestCase">
      * assert [1, 2, 3].any { it == 2 }
-     * assert ![1, 2, 3].any { it > 3 }
+     * assert ![1, 2, 3].any { it {@code >} 3 }
      * </pre>
      *
      * @param self      the object over which we iterate
@@ -2627,7 +2627,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * predicate is valid for at least one element.
      * <pre class="groovyTestCase">
      * assert [1, 2, 3].iterator().any { it == 2 }
-     * assert ![1, 2, 3].iterator().any { it > 3 }
+     * assert ![1, 2, 3].iterator().any { it {@code >} 3 }
      * </pre>
      *
      * @param self      the iterator over which we iterate
@@ -2648,7 +2648,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * predicate is valid for at least one element.
      * <pre class="groovyTestCase">
      * assert [1, 2, 3].any { it == 2 }
-     * assert ![1, 2, 3].any { it > 3 }
+     * assert ![1, 2, 3].any { it {@code >} 3 }
      * </pre>
      *
      * @param self      the iterable over which we iterate
@@ -2680,8 +2680,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * otherwise if the closure takes two parameters then it will be
      * passed the key and the value.
      * <pre class="groovyTestCase">
-     * assert [2:3, 4:5, 5:10].any { key, value -> key * 2 == value }
-     * assert ![2:3, 4:5, 5:10].any { entry -> entry.key == entry.value * 2 }
+     * assert [2:3, 4:5, 5:10].any { key, value {@code ->} key * 2 == value }
+     * assert ![2:3, 4:5, 5:10].any { entry {@code ->} entry.key == entry.value * 2 }
      * </pre>
      *
      * @param self      the map over which we iterate
@@ -2702,7 +2702,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Iterates over the elements of a collection, and checks whether at least
      * one element is true according to the Groovy Truth.
-     * Equivalent to self.any({element -> element})
+     * Equivalent to self.any({element {@code ->} element})
      * <pre class="groovyTestCase">
      * assert [false, true].any()
      * assert [0, 1].any()
@@ -3062,7 +3062,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Otherwise, the closure should take two parameters and will be passed the key and value.
      * <p>
      * Example usage:
-     * <pre class="groovyTestCase">assert [a:1, b:1, c:2, d:2].count{ k,v -> k == 'a' || v == 2 } == 3</pre>
+     * <pre class="groovyTestCase">assert [a:1, b:1, c:2, d:2].count{ k,v {@code ->} k == 'a' {@code ||} v == 2 } == 3</pre>
      *
      * @param self  the map within which we count the number of occurrences
      * @param closure a 1 or 2 arg Closure condition applying on the entries
@@ -3806,7 +3806,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * assert squaresAndCubesOfEvens == [4, 8, 16, 64, 36, 216, 64, 512, 100, 1000]
      *
      * def animals = ['CAT', 'DOG', 'ELEPHANT'] as Set
-     * def smallAnimals = animals.collectMany{ it.size() > 3 ? [] : [it.toLowerCase()] }
+     * def smallAnimals = animals.collectMany{ it.size() {@code >} 3 ? [] : [it.toLowerCase()] }
      * assert smallAnimals == ['cat', 'dog']
      *
      * def orig = nums as Set
@@ -3831,7 +3831,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * <pre class="groovyTestCase">
      * def animals = ['CAT', 'DOG', 'ELEPHANT'] as Set
-     * def smallAnimals = animals.collectMany(['ant', 'bee']){ it.size() > 3 ? [] : [it.toLowerCase()] }
+     * def smallAnimals = animals.collectMany(['ant', 'bee']){ it.size() {@code >} 3 ? [] : [it.toLowerCase()] }
      * assert smallAnimals == ['ant', 'bee', 'cat', 'dog']
      *
      * def nums = 1..5
@@ -3858,7 +3858,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * <pre class="groovyTestCase">
      * def map = [bread:3, milk:5, butter:2]
-     * def result = map.collectMany(['x']){ k, v -> k.startsWith('b') ? k.toList() : [] }
+     * def result = map.collectMany(['x']){ k, v {@code ->} k.startsWith('b') ? k.toList() : [] }
      * assert result == ['x', 'b', 'r', 'e', 'a', 'd', 'b', 'u', 't', 't', 'e', 'r']
      * </pre>
      *
@@ -3881,7 +3881,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * <pre class="groovyTestCase">
      * def map = [bread:3, milk:5, butter:2]
-     * def result = map.collectMany{ k, v -> k.startsWith('b') ? k.toList() : [] }
+     * def result = map.collectMany{ k, v {@code ->} k.startsWith('b') ? k.toList() : [] }
      * assert result == ['b', 'r', 'e', 'a', 'd', 'b', 'u', 't', 't', 'e', 'r']
      * </pre>
      *
@@ -3937,8 +3937,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Iterates through this Map transforming each map entry into a new value using the <code>transform</code> closure
      * returning the <code>collector</code> with all transformed values added to it.
-     * <pre class="groovyTestCase">assert [a:1, b:2].collect( [] as HashSet ) { key, value -> key*value } == ["a", "bb"] as Set
-     * assert [3:20, 2:30].collect( [] as HashSet ) { entry -> entry.key * entry.value } == [60] as Set</pre>
+     * <pre class="groovyTestCase">assert [a:1, b:2].collect( [] as HashSet ) { key, value {@code ->} key*value } == ["a", "bb"] as Set
+     * assert [3:20, 2:30].collect( [] as HashSet ) { entry {@code ->} entry.key * entry.value } == [60] as Set</pre>
      *
      * @param self      a Map
      * @param collector the Collection to which transformed values are added
@@ -3956,8 +3956,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Iterates through this Map transforming each map entry into a new value using the <code>transform</code> closure
      * returning a list of transformed values.
-     * <pre class="groovyTestCase">assert [a:1, b:2].collect { key, value -> key*value } == ["a", "bb"]
-     * assert [3:20, 2:30].collect { entry -> entry.key * entry.value } == [60, 60]</pre>
+     * <pre class="groovyTestCase">assert [a:1, b:2].collect { key, value {@code ->} key*value } == ["a", "bb"]
+     * assert [3:20, 2:30].collect { entry {@code ->} entry.key * entry.value } == [60, 60]</pre>
      *
      * @param self    a Map
      * @param transform the transformation closure which can take one (Map.Entry) or two (key, value) parameters
@@ -3972,8 +3972,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Iterates through this Map transforming each map entry using the <code>transform</code> closure
      * returning a map of the transformed entries.
      * <pre class="groovyTestCase">
-     * assert [a:1, b:2].collectEntries( [:] ) { k, v -> [v, k] } == [1:'a', 2:'b']
-     * assert [a:1, b:2].collectEntries( [30:'C'] ) { key, value ->
+     * assert [a:1, b:2].collectEntries( [:] ) { k, v {@code ->} [v, k] } == [1:'a', 2:'b']
+     * assert [a:1, b:2].collectEntries( [30:'C'] ) { key, value {@code ->}
      *     [(value*10): key.toUpperCase()] } == [10:'A', 20:'B', 30:'C']
      * </pre>
      * Note: When using the list-style of result, the behavior is '<code>def (key, value) = listResultFromClosure</code>'.
@@ -4000,8 +4000,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Iterates through this Map transforming each entry using the <code>transform</code> closure
      * and returning a map of the transformed entries.
      * <pre class="groovyTestCase">
-     * assert [a:1, b:2].collectEntries { key, value -> [value, key] } == [1:'a', 2:'b']
-     * assert [a:1, b:2].collectEntries { key, value ->
+     * assert [a:1, b:2].collectEntries { key, value {@code ->} [value, key] } == [1:'a', 2:'b']
+     * assert [a:1, b:2].collectEntries { key, value {@code ->}
      *     [(value*10): key.toUpperCase()] } == [10:'A', 20:'B']
      * </pre>
      * Note: When using the list-style of result, the behavior is '<code>def (key, value) = listResultFromClosure</code>'.
@@ -4050,9 +4050,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      * def letters = "abc"
      * // collect letters with index using list style
-     * assert (0..2).collectEntries { index -> [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
+     * assert (0..2).collectEntries { index {@code ->} [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
      * // collect letters with index using map style
-     * assert (0..2).collectEntries { index -> [(index): letters[index]] } == [0:'a', 1:'b', 2:'c']
+     * assert (0..2).collectEntries { index {@code ->} [(index): letters[index]] } == [0:'a', 1:'b', 2:'c']
      * </pre>
      * Note: When using the list-style of result, the behavior is '<code>def (key, value) = listResultFromClosure</code>'.
      * While we strongly discourage using a list of size other than 2, Groovy's normal semantics apply in this case;
@@ -4145,8 +4145,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      * def letters = "abc"
      * // collect letters with index
-     * assert (0..2).collectEntries( [:] ) { index -> [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
-     * assert (0..2).collectEntries( [4:'d'] ) { index ->
+     * assert (0..2).collectEntries( [:] ) { index {@code ->} [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
+     * assert (0..2).collectEntries( [4:'d'] ) { index {@code ->}
      *     [(index+1): letters[index]] } == [1:'a', 2:'b', 3:'c', 4:'d']
      * </pre>
      * Note: When using the list-style of result, the behavior is '<code>def (key, value) = listResultFromClosure</code>'.
@@ -4211,8 +4211,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * def letters = "abc"
      * def nums = [0, 1, 2] as Integer[]
      * // collect letters with index
-     * assert nums.collectEntries( [:] ) { index -> [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
-     * assert nums.collectEntries( [4:'d'] ) { index ->
+     * assert nums.collectEntries( [:] ) { index {@code ->} [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
+     * assert nums.collectEntries( [4:'d'] ) { index {@code ->}
      *     [(index+1): letters[index]] } == [1:'a', 2:'b', 3:'c', 4:'d']
      * </pre>
      * Note: When using the list-style of result, the behavior is '<code>def (key, value) = listResultFromClosure</code>'.
@@ -4253,9 +4253,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * def letters = "abc"
      * def nums = [0, 1, 2] as Integer[]
      * // collect letters with index using list style
-     * assert nums.collectEntries { index -> [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
+     * assert nums.collectEntries { index {@code ->} [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
      * // collect letters with index using map style
-     * assert nums.collectEntries { index -> [(index): letters[index]] } == [0:'a', 1:'b', 2:'c']
+     * assert nums.collectEntries { index {@code ->} [(index): letters[index]] } == [0:'a', 1:'b', 2:'c']
      * </pre>
      * Note: When using the list-style of result, the behavior is '<code>def (key, value) = listResultFromClosure</code>'.
      * While we strongly discourage using a list of size other than 2, Groovy's normal semantics apply in this case;
@@ -4312,7 +4312,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * <pre class="groovyTestCase">
      * def numbers = [1, 2, 3]
-     * def result = numbers.find { it > 1}
+     * def result = numbers.find { it {@code >} 1}
      * assert result == 2
      * </pre>
      *
@@ -4353,7 +4353,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Finds the first value matching the closure condition.  Example:
      * <pre class="groovyTestCase">def list = [1,2,3]
-     * assert 2 == list.find { it > 1 }
+     * assert 2 == list.find { it {@code >} 1 }
      * </pre>
      *
      * @param self    a Collection
@@ -4376,8 +4376,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example:
      * <pre class="groovyTestCase">
      * def list = [1,2,3] as Integer[]
-     * assert 2 == list.find { it > 1 }
-     * assert null == list.find { it > 5 }
+     * assert 2 == list.find { it {@code >} 1 }
+     * assert null == list.find { it {@code >} 5 }
      * </pre>
      *
      * @param self      an Array
@@ -4418,8 +4418,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * <pre class="groovyTestCase">
      * int[] numbers = [1, 2, 3]
-     * assert numbers.findResult { if(it > 1) return it } == 2
-     * assert numbers.findResult { if(it > 4) return it } == null
+     * assert numbers.findResult { if(it {@code >} 1) return it } == 2
+     * assert numbers.findResult { if(it {@code >} 4) return it } == null
      * </pre>
      *
      * @param self      an Object with an iterator returning its values
@@ -4443,8 +4443,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * <pre class="groovyTestCase">
      * int[] numbers = [1, 2, 3]
-     * assert numbers.findResult(5) { if(it > 1) return it } == 2
-     * assert numbers.findResult(5) { if(it > 4) return it } == 5
+     * assert numbers.findResult(5) { if(it {@code >} 1) return it } == 2
+     * assert numbers.findResult(5) { if(it {@code >} 4) return it } == 5
      * </pre>
      *
      * @param self          an Object with an iterator returning its values
@@ -4497,8 +4497,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Examples:
      * <pre class="groovyTestCase">
      * def iter = [1,2,3].iterator()
-     * assert "Found 2" == iter.findResult("default") { it > 1 ? "Found $it" : null }
-     * assert "default" == iter.findResult("default") { it > 3 ? "Found $it" : null }
+     * assert "Found 2" == iter.findResult("default") { it {@code >} 1 ? "Found $it" : null }
+     * assert "default" == iter.findResult("default") { it {@code >} 3 ? "Found $it" : null }
      * </pre>
      *
      * @param self          an Iterator
@@ -4540,8 +4540,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Examples:
      * <pre class="groovyTestCase">
      * def list = [1,2,3]
-     * assert "Found 2" == list.findResult("default") { it > 1 ? "Found $it" : null }
-     * assert "default" == list.findResult("default") { it > 3 ? "Found $it" : null }
+     * assert "Found 2" == list.findResult("default") { it {@code >} 1 ? "Found $it" : null }
+     * assert "default" == list.findResult("default") { it {@code >} 3 ? "Found $it" : null }
      * </pre>
      *
      * @param self          an Iterable
@@ -4603,7 +4603,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      * assert "Found b:3" == [a:1, b:3].findResult { if (it.value == 3) return "Found ${it.key}:${it.value}" }
      * assert null == [a:1, b:3].findResult { if (it.value == 9) return "Found ${it.key}:${it.value}" }
-     * assert "Found a:1" == [a:1, b:3].findResult { k, v -> if (k.size() + v == 2) return "Found $k:$v" }
+     * assert "Found a:1" == [a:1, b:3].findResult { k, v {@code ->} if (k.size() + v == 2) return "Found $k:$v" }
      * </pre>
      *
      * @param self      a Map
@@ -4628,7 +4628,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      * assert "Found b:3" == [a:1, b:3].findResult("default") { if (it.value == 3) return "Found ${it.key}:${it.value}" }
      * assert "default" == [a:1, b:3].findResult("default") { if (it.value == 9) return "Found ${it.key}:${it.value}" }
-     * assert "Found a:1" == [a:1, b:3].findResult("default") { k, v -> if (k.size() + v == 2) return "Found $k:$v" }
+     * assert "Found a:1" == [a:1, b:3].findResult("default") { k, v {@code ->} if (k.size() + v == 2) return "Found $k:$v" }
      * </pre>
      *
      * @param self          a Map
@@ -4660,7 +4660,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example:
      * <pre class="groovyTestCase">
      * def list = [1,2,3]
-     * def result = list.findResults { it > 1 ? "Found $it" : null }
+     * def result = list.findResults { it {@code >} 1 ? "Found $it" : null }
      * assert result == ["Found 2", "Found 3"]
      * </pre>
      *
@@ -4716,7 +4716,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example:
      * <pre class="groovyTestCase">
      * def map = [a:1, b:2, hi:2, cat:3, dog:2]
-     * def result = map.findResults { k, v -> k.size() == v ? "Found $k:$v" : null }
+     * def result = map.findResults { k, v {@code ->} k.size() == v ? "Found $k:$v" : null }
      * assert result == ["Found a:1", "Found hi:2", "Found cat:3"]
      * </pre>
      *
@@ -5052,7 +5052,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * take two parameters, which will be the key and the value.
      *
      * <pre class="groovyTestCase">def map = [a:1, b:2]
-     * map.retainAll { k,v -> k == 'b' }
+     * map.retainAll { k,v {@code ->} k == 'b' }
      * assert map == [b:2]</pre>
      *
      * See also <code>findAll</code> when wanting to produce a new map containing items
@@ -5115,7 +5115,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * will be the key and the value.
      *
      * <pre class="groovyTestCase">def map = [a:1, b:2]
-     * map.removeAll { k,v -> k == 'b' }
+     * map.removeAll { k,v {@code ->} k == 'b' }
      * assert map == [a:1]</pre>
      *
      * See also <code>findAll</code> when wanting to produce a new map containing items
@@ -5319,7 +5319,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Adds GroovyCollections#combinations(Iterable, Closure) as a method on collections.
      * <p>
      * Example usage:
-     * <pre class="groovyTestCase">assert [[2, 3],[4, 5, 6]].combinations {x,y -> x*y } == [8, 12, 10, 15, 12, 18]</pre>
+     * <pre class="groovyTestCase">assert [[2, 3],[4, 5, 6]].combinations {x,y {@code ->} x*y } == [8, 12, 10, 15, 12, 18]</pre>
      *
      * @param self a Collection of lists
      * @param function a closure to be called on each combination
@@ -5396,7 +5396,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * into a list.
      * <p>
      * Example usage:
-     * <pre class="groovyTestCase">Set result = [1, 2, 3].permutations { it.collect { v -> 2*v }}
+     * <pre class="groovyTestCase">Set result = [1, 2, 3].permutations { it.collect { v {@code ->} 2*v }}
      * assert result == [[6, 4, 2], [6, 2, 4], [2, 6, 4], [4, 6, 2], [4, 2, 6], [2, 4, 6]] as Set</pre>
      *
      * @param self the Iterable of items
@@ -5579,7 +5579,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * of items for that 'group path'.
      *
      * Example usage:
-     * <pre class="groovyTestCase">def result = [1,2,3,4,5,6].groupBy({ it % 2 }, { it < 4 })
+     * <pre class="groovyTestCase">def result = [1,2,3,4,5,6].groupBy({ it % 2 }, { it {@code <} 4 })
      * assert result == [1:[(true):[1, 3], (false):[5]], 0:[(true):[2], (false):[4, 6]]]</pre>
      *
      * Another example:
@@ -5612,7 +5612,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
         final Object[] tail = new Object[closures.length - 1];
         System.arraycopy(closures, 1, tail, 0, closures.length - 1); // Arrays.copyOfRange only since JDK 1.6
 
-        // inject([:]) { a,e -> a << [(e.key): e.value.groupBy(tail)] }
+        // inject([:]) { a,e {@code ->} a {@code <<} [(e.key): e.value.groupBy(tail)] }
         Map<Object, Map> acc = new LinkedHashMap<Object, Map>();
         for (Map.Entry<Object, List> item : first.entrySet()) {
             acc.put(item.getKey(), groupBy((Iterable)item.getValue(), tail));
@@ -5655,7 +5655,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * Example usage:
      * <pre class="groovyTestCase">
-     * def result = [1,2,3,4,5,6].groupBy([{ it % 2 }, { it < 4 }])
+     * def result = [1,2,3,4,5,6].groupBy([{ it % 2 }, { it {@code <} 4 }])
      * assert result == [1:[(true):[1, 3], (false):[5]], 0:[(true):[2], (false):[4, 6]]]
      * </pre>
      *
@@ -5987,10 +5987,10 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Performs the same function as the version of inject that takes an initial value, but
      * uses the head of the Collection as the initial value, and iterates over the tail.
      * <pre class="groovyTestCase">
-     * assert 1 * 2 * 3 * 4 == [ 1, 2, 3, 4 ].inject { acc, val -> acc * val }
-     * assert ['b'] == [['a','b'], ['b','c'], ['d','b']].inject { acc, val -> acc.intersect( val ) }
+     * assert 1 * 2 * 3 * 4 == [ 1, 2, 3, 4 ].inject { acc, val {@code ->} acc * val }
+     * assert ['b'] == [['a','b'], ['b','c'], ['d','b']].inject { acc, val {@code ->} acc.intersect( val ) }
      * LinkedHashSet set = [ 't', 'i', 'm' ]
-     * assert 'tim' == set.inject { a, b -> a + b }
+     * assert 'tim' == set.inject { a, b {@code ->} a + b }
      * </pre>
      *
      * @param self         a Collection
@@ -6023,17 +6023,17 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * Examples:
      * <pre class="groovyTestCase">
-     * assert 1*1*2*3*4 == [1,2,3,4].inject(1) { acc, val -> acc * val }
+     * assert 1*1*2*3*4 == [1,2,3,4].inject(1) { acc, val {@code ->} acc * val }
      *
-     * assert 0+1+2+3+4 == [1,2,3,4].inject(0) { acc, val -> acc + val }
+     * assert 0+1+2+3+4 == [1,2,3,4].inject(0) { acc, val {@code ->} acc + val }
      *
      * assert 'The quick brown fox' ==
-     *     ['quick', 'brown', 'fox'].inject('The') { acc, val -> acc + ' ' + val }
+     *     ['quick', 'brown', 'fox'].inject('The') { acc, val {@code ->} acc + ' ' + val }
      *
      * assert 'bat' ==
-     *     ['rat', 'bat', 'cat'].inject('zzz') { min, next -> next < min ? next : min }
+     *     ['rat', 'bat', 'cat'].inject('zzz') { min, next {@code ->} next {@code <} min ? next : min }
      *
-     * def max = { a, b -> [a, b].max() }
+     * def max = { a, b {@code ->} [a, b].max() }
      * def animals = ['bat', 'rat', 'cat']
      * assert 'rat' == animals.inject('aaa', max)
      * </pre>
@@ -6041,11 +6041,11 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre>
      *    initVal  animals[0]
      *       v        v
-     * max('aaa',   'bat')  =>  'bat'  animals[1]
+     * max('aaa',   'bat')  {@code =>}  'bat'  animals[1]
      *                            v       v
-     *                      max('bat',  'rat')  =>  'rat'  animals[2]
+     *                      max('bat',  'rat')  {@code =>}  'rat'  animals[2]
      *                                                v       v
-     *                                          max('rat',  'cat')  =>  'rat'
+     *                                          max('rat',  'cat')  {@code =>}  'rat'
      * </pre>
      *
      * @param self         a Collection
@@ -6070,7 +6070,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Examples:
      * <pre class="groovyTestCase">
      * def map = [a:1, b:2, c:3]
-     * assert map.inject([]) { list, k, v ->
+     * assert map.inject([]) { list, k, v {@code ->}
      *   list + [k] * v
      * } == ['a', 'b', 'b', 'c', 'c', 'c']
      * </pre>
@@ -7013,7 +7013,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * Selects the minimum value found in the Iterable using the given comparator.
-     * <pre class="groovyTestCase">assert "hi" == ["hello","hi","hey"].min( { a, b -> a.length() <=> b.length() } as Comparator )</pre>
+     * <pre class="groovyTestCase">assert "hi" == ["hello","hi","hey"].min( { a, b {@code ->} a.length() {@code <=>} b.length() } as Comparator )</pre>
      *
      * @param self       an Iterable
      * @param comparator a Comparator
@@ -7087,7 +7087,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * assert "hi" == ["hello","hi","hey"].min { it.length() }
      * </pre>
      * <pre class="groovyTestCase">
-     * def lastDigit = { a, b -> a % 10 <=> b % 10 }
+     * def lastDigit = { a, b {@code ->} a % 10 {@code <=>} b % 10 }
      * assert [19, 55, 91].min(lastDigit) == 91
      * </pre>
      * <pre class="groovyTestCase">
@@ -7141,13 +7141,13 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * def zoo = [monkeys:6, lions:5, tigers:7]
      * def leastCommonEntry = zoo.min{ it.value }
      * assert leastCommonEntry.value == 5
-     * def mostCommonEntry = zoo.min{ a, b -> b.value <=> a.value } // double negative!
+     * def mostCommonEntry = zoo.min{ a, b {@code ->} b.value {@code <=>} a.value } // double negative!
      * assert mostCommonEntry.value == 7
      * </pre>
      * Edge case for multiple min values:
      * <pre class="groovyTestCase">
      * def zoo = [monkeys:6, lions:5, tigers:7]
-     * def lastCharOfName = { e -> e.key[-1] }
+     * def lastCharOfName = { e {@code ->} e.key[-1] }
      * def ans = zoo.min(lastCharOfName) // some random entry
      * assert lastCharOfName(ans) == 's'
      * </pre>
@@ -7179,13 +7179,13 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * def zoo = [monkeys:6, lions:5, tigers:7]
      * def mostCommonEntry = zoo.max{ it.value }
      * assert mostCommonEntry.value == 7
-     * def leastCommonEntry = zoo.max{ a, b -> b.value <=> a.value } // double negative!
+     * def leastCommonEntry = zoo.max{ a, b {@code ->} b.value {@code <=>} a.value } // double negative!
      * assert leastCommonEntry.value == 5
      * </pre>
      * Edge case for multiple max values:
      * <pre class="groovyTestCase">
      * def zoo = [monkeys:6, lions:5, tigers:7]
-     * def lengthOfNamePlusNumber = { e -> e.key.size() + e.value }
+     * def lengthOfNamePlusNumber = { e {@code ->} e.key.size() + e.value }
      * def ans = zoo.max(lengthOfNamePlusNumber) // one of [monkeys:6, tigers:7]
      * assert lengthOfNamePlusNumber(ans) == 13
      * </pre>
@@ -7322,7 +7322,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Comparable (typically an Integer) which is then used for
      * further comparison.
      * <pre class="groovyTestCase">assert "hello" == ["hello","hi","hey"].max { it.length() }</pre>
-     * <pre class="groovyTestCase">assert "hello" == ["hello","hi","hey"].max { a, b -> a.length() <=> b.length() }</pre>
+     * <pre class="groovyTestCase">assert "hello" == ["hello","hi","hey"].max { a, b {@code ->} a.length() {@code <=>} b.length() }</pre>
      * <pre class="groovyTestCase">
      * def pets = ['dog', 'elephant', 'anaconda']
      * def longestName = pets.max{ it.size() } // one of 'elephant' or 'anaconda'
@@ -7416,7 +7416,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Selects the maximum value found in the Iterable using the given comparator.
      * <pre class="groovyTestCase">
-     * assert "hello" == ["hello","hi","hey"].max( { a, b -> a.length() <=> b.length() } as Comparator )
+     * assert "hello" == ["hello","hi","hey"].max( { a, b {@code ->} a.length() {@code <=>} b.length() } as Comparator )
      * </pre>
      *
      * @param self       an Iterable
@@ -7484,7 +7484,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example:
      * <pre class="groovyTestCase">
      * String[] letters = ['a', 'b', 'c', 'd']
-     * assert 0..<4 == letters.indices
+     * {@code assert 0..<4 == letters.indices}
      * </pre>
      *
      * @param self an array
@@ -7641,8 +7641,10 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * Support the range subscript operator for an eager or lazy List.
-     * <pre class="groovyTestCase">def list = [true, 1, 3.4].withDefault{ 42 }
-     * assert list[0..<0] == []</pre>
+     * <pre class="groovyTestCase">
+     * def list = [true, 1, 3.4].withDefault{ 42 }
+     * {@code assert list[0..<0] == []}
+     * </pre>
      *
      * @param self  a ListWithDefault
      * @param range a Range indicating the items to get
@@ -7656,8 +7658,10 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * Support the range subscript operator for a List.
-     * <pre class="groovyTestCase">def list = [true, 1, 3.4]
-     * assert list[0..<0] == []</pre>
+     * <pre class="groovyTestCase">
+     * def list = [true, 1, 3.4]
+     * {@code assert list[0..<0] == []}
+     * </pre>
      *
      * @param self  a List
      * @param range a Range indicating the items to get
@@ -7985,9 +7989,11 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * A helper method to allow lists to work with subscript operators.
-     * <pre class="groovyTestCase">def list = ["a", true]
-     * list[1..<1] = 5
-     * assert list == ["a", 5, true]</pre>
+     * <pre class="groovyTestCase">
+     * def list = ["a", true]
+     * {@code list[1..<1] = 5}
+     * assert list == ["a", 5, true]
+     * </pre>
      *
      * @param self  a List
      * @param range the (in this case empty) subset of the list to set
@@ -8009,9 +8015,11 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * A helper method to allow lists to work with subscript operators.
-     * <pre class="groovyTestCase">def list = ["a", true]
-     * list[1..<1] = [4, 3, 2]
-     * assert list == ["a", 4, 3, 2, true]</pre>
+     * <pre class="groovyTestCase">
+     * def list = ["a", true]
+     * {@code list[1..<1] = [4, 3, 2]}
+     * assert list == ["a", 4, 3, 2, true]
+     * </pre>
      *
      * @param self  a List
      * @param range the (in this case empty) subset of the list to set
@@ -8598,9 +8606,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * result of calling the supplied Closure with the key as the parameter to the Closure.
      * Example usage:
      * <pre class="groovyTestCase">
-     * def map = [a:1, b:2].withDefault{ k -> k.toCharacter().isLowerCase() ? 10 : -10 }
+     * def map = [a:1, b:2].withDefault{ k {@code ->} k.toCharacter().isLowerCase() ? 10 : -10 }
      * def expected = [a:1, b:2, c:10, D:-10]
-     * assert expected.every{ e -> e.value == map[e.key] }
+     * assert expected.every{ e {@code ->} e.value == map[e.key] }
      *
      * def constMap = [:].withDefault{ 42 }
      * assert constMap.foo == 42
@@ -8662,7 +8670,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * assert list == [0, 1, null, 42] // gap filled with null
      *
      * // illustrate using the index when generating default values
-     * def list2 = [5].withLazyDefault{ index -> index * index }
+     * def list2 = [5].withLazyDefault{ index {@code ->} index * index }
      * assert list2[3] == 9
      * assert list2 == [5, null, null, 9]
      * assert list2[2] == 4
@@ -8708,7 +8716,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * assert list == [0, 1, 42, 42]   // gap filled with default value
      *
      * // illustrate using the index when generating default values
-     * def list2 = [5].withEagerDefault{ index -> index * index }
+     * def list2 = [5].withEagerDefault{ index {@code ->} index * index }
      * assert list2[3] == 9
      * assert list2 == [5, 1, 4, 9]
      *
@@ -8738,7 +8746,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example usage:
      * <pre class="groovyTestCase">
      * assert [["a", 0], ["b", 1]] == ["a", "b"].withIndex()
-     * assert ["0: a", "1: b"] == ["a", "b"].withIndex().collect { str, idx -> "$idx: $str" }
+     * assert ["0: a", "1: b"] == ["a", "b"].withIndex().collect { str, idx {@code ->} "$idx: $str" }
      * </pre>
      *
      * @param self an Iterable
@@ -8756,7 +8764,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example usage:
      * <pre class="groovyTestCase">
      * assert [0: "a", 1: "b"] == ["a", "b"].indexed()
-     * assert ["0: a", "1: b"] == ["a", "b"].indexed().collect { idx, str -> "$idx: $str" }
+     * assert ["0: a", "1: b"] == ["a", "b"].indexed().collect { idx, str {@code ->} "$idx: $str" }
      * </pre>
      *
      * @param self an Iterable
@@ -8774,7 +8782,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example usage:
      * <pre class="groovyTestCase">
      * assert [["a", 5], ["b", 6]] == ["a", "b"].withIndex(5)
-     * assert ["1: a", "2: b"] == ["a", "b"].withIndex(1).collect { str, idx -> "$idx: $str" }
+     * assert ["1: a", "2: b"] == ["a", "b"].withIndex(1).collect { str, idx {@code ->} "$idx: $str" }
      * </pre>
      *
      * @param self   an Iterable
@@ -8793,7 +8801,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example usage:
      * <pre class="groovyTestCase">
      * assert [5: "a", 6: "b"] == ["a", "b"].indexed(5)
-     * assert ["1: a", "2: b"] == ["a", "b"].indexed(1).collect { idx, str -> "$idx: $str" }
+     * assert ["1: a", "2: b"] == ["a", "b"].indexed(1).collect { idx, str {@code ->} "$idx: $str" }
      * </pre>
      *
      * @param self   an Iterable
@@ -8818,7 +8826,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example usage:
      * <pre class="groovyTestCase">
      * assert [["a", 0], ["b", 1]] == ["a", "b"].iterator().withIndex().toList()
-     * assert ["0: a", "1: b"] == ["a", "b"].iterator().withIndex().collect { str, idx -> "$idx: $str" }.toList()
+     * assert ["0: a", "1: b"] == ["a", "b"].iterator().withIndex().collect { str, idx {@code ->} "$idx: $str" }.toList()
      * </pre>
      *
      * @param self an iterator
@@ -8835,8 +8843,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p/>
      * Example usage:
      * <pre class="groovyTestCase">
-     * assert [[0, "a"], [1, "b"]] == ["a", "b"].iterator().indexed().collect{ tuple -> [tuple.first, tuple.second] }
-     * assert ["0: a", "1: b"] == ["a", "b"].iterator().indexed().collect { idx, str -> "$idx: $str" }.toList()
+     * assert [[0, "a"], [1, "b"]] == ["a", "b"].iterator().indexed().collect{ tuple {@code ->} [tuple.first, tuple.second] }
+     * assert ["0: a", "1: b"] == ["a", "b"].iterator().indexed().collect { idx, str {@code ->} "$idx: $str" }.toList()
      * </pre>
      *
      * @param self an iterator
@@ -8854,7 +8862,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example usage:
      * <pre class="groovyTestCase">
      * assert [["a", 5], ["b", 6]] == ["a", "b"].iterator().withIndex(5).toList()
-     * assert ["1: a", "2: b"] == ["a", "b"].iterator().withIndex(1).collect { str, idx -> "$idx: $str" }.toList()
+     * assert ["1: a", "2: b"] == ["a", "b"].iterator().withIndex(1).collect { str, idx {@code ->} "$idx: $str" }.toList()
      * </pre>
      *
      * @param self   an iterator
@@ -8873,7 +8881,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Example usage:
      * <pre class="groovyTestCase">
      * assert [[5, "a"], [6, "b"]] == ["a", "b"].iterator().indexed(5).toList()
-     * assert ["a: 1", "b: 2"] == ["a", "b"].iterator().indexed(1).collect { idx, str -> "$str: $idx" }.toList()
+     * assert ["a: 1", "b: 2"] == ["a", "b"].iterator().indexed(1).collect { idx, str {@code ->} "$str: $idx" }.toList()
      * </pre>
      *
      * @param self   an iterator
@@ -8998,7 +9006,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Sorts the elements from the given map into a new ordered map using
      * the closure as a comparator to determine the ordering.
      * The original map is unchanged.
-     * <pre class="groovyTestCase">def map = [a:5, b:3, c:6, d:4].sort { a, b -> a.value <=> b.value }
+     * <pre class="groovyTestCase">def map = [a:5, b:3, c:6, d:4].sort { a, b {@code ->} a.value {@code <=>} b.value }
      * assert map == [b:3, d:4, a:5, c:6]</pre>
      *
      * @param self the original unsorted map
@@ -9020,7 +9028,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Sorts the elements from the given map into a new ordered Map using
      * the specified key comparator to determine the ordering.
      * The original map is unchanged.
-     * <pre class="groovyTestCase">def map = [ba:3, cz:6, ab:5].sort({ a, b -> a[-1] <=> b[-1] } as Comparator)
+     * <pre class="groovyTestCase">def map = [ba:3, cz:6, ab:5].sort({ a, b {@code ->} a[-1] {@code <=>} b[-1] } as Comparator)
      * assert map*.value == [3, 5, 6]</pre>
      *
      * @param self the original unsorted map
@@ -9141,7 +9149,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * is true, it is sorted in place and returned. Otherwise, the elements are first placed
      * into a new list which is then sorted and returned - leaving the original Iterable unchanged.
      * <pre class="groovyTestCase">
-     * assert ["hi","hey","hello"] == ["hello","hi","hey"].sort(false, { a, b -> a.length() <=> b.length() } as Comparator )
+     * assert ["hi","hey","hello"] == ["hello","hi","hey"].sort(false, { a, b {@code ->} a.length() {@code <=>} b.length() } as Comparator )
      * </pre>
      * <pre class="groovyTestCase">
      * def orig = ["hello","hi","Hey"]
@@ -9307,7 +9315,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Comparable (typically an Integer) which is then used for
      * further comparison.
      * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { it.length() }</pre>
-     * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { a, b -> a.length() <=> b.length() }</pre>
+     * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { a, b {@code ->} a.length() {@code <=>} b.length() }</pre>
      *
      * @param self    the Iterable to be sorted
      * @param closure a 1 or 2 arg Closure used to determine the correct ordering
@@ -9333,7 +9341,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Comparable (typically an Integer) which is then used for
      * further comparison.
      * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { it.length() }</pre>
-     * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { a, b -> a.length() <=> b.length() }</pre>
+     * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { a, b {@code ->} a.length() {@code <=>} b.length() }</pre>
      * <pre class="groovyTestCase">
      * def orig = ["hello","hi","Hey"]
      * def sorted = orig.sort(false) { it.toUpperCase() }
@@ -9437,7 +9445,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Comparable (typically an Integer) which is then used for
      * further comparison.
      * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { it.length() }</pre>
-     * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { a, b -> a.length() <=> b.length() }</pre>
+     * <pre class="groovyTestCase">assert ["hi","hey","hello"] == ["hello","hi","hey"].sort { a, b {@code ->} a.length() {@code <=>} b.length() }</pre>
      *
      * @param self    the Iterable to be sorted
      * @param closure a 1 or 2 arg Closure used to determine the correct ordering
@@ -9517,7 +9525,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Returns a sorted version of the given array using the supplied comparator to determine the resulting order.
      * <pre class="groovyTestCase">
-     * def sumDigitsComparator = [compare: { num1, num2 -> num1.toString().toList()*.toInteger().sum() <=> num2.toString().toList()*.toInteger().sum() }] as Comparator
+     * def sumDigitsComparator = [compare: { num1, num2 {@code ->} num1.toString().toList()*.toInteger().sum() {@code <=>} num2.toString().toList()*.toInteger().sum() }] as Comparator
      * Integer[] nums = [9, 44, 222, 7000]
      * def result = nums.toSorted(sumDigitsComparator)
      * assert result instanceof Integer[]
@@ -9587,8 +9595,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Sorts the elements from the given map into a new ordered map using
      * the supplied comparator to determine the ordering. The original map is unchanged.
      * <pre class="groovyTestCase">
-     * def keyComparator = [compare: { e1, e2 -> e1.key <=> e2.key }] as Comparator
-     * def valueComparator = [compare: { e1, e2 -> e1.value <=> e2.value }] as Comparator
+     * def keyComparator = [compare: { e1, e2 {@code ->} e1.key {@code <=>} e2.key }] as Comparator
+     * def valueComparator = [compare: { e1, e2 {@code ->} e1.value {@code <=>} e2.value }] as Comparator
      * def map1 = [a:5, b:3, d:4, c:6].toSorted(keyComparator)
      * assert map1.toString() == '[a:5, b:3, c:6, d:4]'
      * def map2 = [a:5, b:3, d:4, c:6].toSorted(valueComparator)
@@ -9619,7 +9627,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * the Closure is assumed to take a single entry parameter and return a Comparable (typically an Integer)
      * which is then used for further comparison.
      * <pre class="groovyTestCase">
-     * def map = [a:5, b:3, c:6, d:4].toSorted { a, b -> a.value <=> b.value }
+     * def map = [a:5, b:3, c:6, d:4].toSorted { a, b {@code ->} a.value {@code <=>} b.value }
      * assert map.toString() == '[b:3, d:4, a:5, c:6]'
      * </pre>
      *
@@ -10880,9 +10888,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * except that it attempts to preserve the type of the original list.
      * <pre class="groovyTestCase">
      * def nums = [ 1, 3, 2 ]
-     * assert nums.takeWhile{ it < 1 } == []
-     * assert nums.takeWhile{ it < 3 } == [ 1 ]
-     * assert nums.takeWhile{ it < 4 } == [ 1, 3, 2 ]
+     * assert nums.takeWhile{ it {@code <} 1 } == []
+     * assert nums.takeWhile{ it {@code <} 3 } == [ 1 ]
+     * assert nums.takeWhile{ it {@code <} 4 } == [ 1, 3, 2 ]
      * </pre>
      *
      * @param self      the original list
@@ -10913,8 +10921,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *     Iterator<String> iterator() { "abc".iterator() }
      * }
      * def abc = new AbcIterable()
-     * assert abc.takeWhile{ it < 'b' } == ['a']
-     * assert abc.takeWhile{ it <= 'b' } == ['a', 'b']
+     * assert abc.takeWhile{ it {@code <} 'b' } == ['a']
+     * assert abc.takeWhile{ it {@code <=} 'b' } == ['a', 'b']
      * </pre>
      *
      * @param self      an Iterable
@@ -10937,9 +10945,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * except that it attempts to preserve the type of the original SortedSet.
      * <pre class="groovyTestCase">
      * def nums = [ 1, 2, 3 ] as SortedSet
-     * assert nums.takeWhile{ it < 1 } == [] as SortedSet
-     * assert nums.takeWhile{ it < 2 } == [ 1 ] as SortedSet
-     * assert nums.takeWhile{ it < 4 } == [ 1, 2, 3 ] as SortedSet
+     * assert nums.takeWhile{ it {@code <} 1 } == [] as SortedSet
+     * assert nums.takeWhile{ it {@code <} 2 } == [ 1 ] as SortedSet
+     * assert nums.takeWhile{ it {@code <} 4 } == [ 1, 2, 3 ] as SortedSet
      * </pre>
      *
      * @param self      the original SortedSet
@@ -10958,9 +10966,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * passed to the given closure evaluates to true.
      * <pre class="groovyTestCase">
      * def shopping = [milk:1, bread:2, chocolate:3]
-     * assert shopping.takeWhile{ it.key.size() < 6 } == [milk:1, bread:2]
+     * assert shopping.takeWhile{ it.key.size() {@code <} 6 } == [milk:1, bread:2]
      * assert shopping.takeWhile{ it.value % 2 } == [milk:1]
-     * assert shopping.takeWhile{ k, v -> k.size() + v <= 7 } == [milk:1, bread:2]
+     * assert shopping.takeWhile{ k, v {@code ->} k.size() + v {@code <=} 7 } == [milk:1, bread:2]
      * </pre>
      * If the map instance does not have ordered keys, then this function could appear to take random
      * entries. Groovy by default uses LinkedHashMap, so this shouldn't be an issue in the main.
@@ -10990,9 +10998,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * passed to the given closure evaluates to true.
      * <pre class="groovyTestCase">
      * def nums = [ 1, 3, 2 ] as Integer[]
-     * assert nums.takeWhile{ it < 1 } == [] as Integer[]
-     * assert nums.takeWhile{ it < 3 } == [ 1 ] as Integer[]
-     * assert nums.takeWhile{ it < 4 } == [ 1, 3, 2 ] as Integer[]
+     * assert nums.takeWhile{ it {@code <} 1 } == [] as Integer[]
+     * assert nums.takeWhile{ it {@code <} 3 } == [ 1 ] as Integer[]
+     * assert nums.takeWhile{ it {@code <} 4 } == [ 1, 3, 2 ] as Integer[]
      * </pre>
      *
      * @param self      the original array
@@ -11024,9 +11032,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * def a = 0
      * def iter = [ hasNext:{ true }, next:{ a++ } ] as Iterator
      *
-     * assert [].iterator().takeWhile{ it < 3 }.toList() == []
-     * assert [1, 2, 3, 4, 5].iterator().takeWhile{ it < 3 }.toList() == [ 1, 2 ]
-     * assert iter.takeWhile{ it < 5 }.toList() == [ 0, 1, 2, 3, 4 ]
+     * assert [].iterator().takeWhile{ it {@code <} 3 }.toList() == []
+     * assert [1, 2, 3, 4, 5].iterator().takeWhile{ it {@code <} 3 }.toList() == [ 1, 2 ]
+     * assert iter.takeWhile{ it {@code <} 5 }.toList() == [ 0, 1, 2, 3, 4 ]
      * </pre>
      *
      * @param self      the Iterator
@@ -11087,8 +11095,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * except that it attempts to preserve the type of the original SortedSet.
      * <pre class="groovyTestCase">
      * def nums = [ 1, 2, 3 ] as SortedSet
-     * assert nums.dropWhile{ it < 4 } == [] as SortedSet
-     * assert nums.dropWhile{ it < 2 } == [ 2, 3 ] as SortedSet
+     * assert nums.dropWhile{ it {@code <} 4 } == [] as SortedSet
+     * assert nums.dropWhile{ it {@code <} 2 } == [ 2, 3 ] as SortedSet
      * assert nums.dropWhile{ it != 3 } == [ 3 ] as SortedSet
      * assert nums.dropWhile{ it == 0 } == [ 1, 2, 3 ] as SortedSet
      * </pre>
@@ -11110,8 +11118,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * except that it attempts to preserve the type of the original list.
      * <pre class="groovyTestCase">
      * def nums = [ 1, 3, 2 ]
-     * assert nums.dropWhile{ it < 4 } == []
-     * assert nums.dropWhile{ it < 3 } == [ 3, 2 ]
+     * assert nums.dropWhile{ it {@code <} 4 } == []
+     * assert nums.dropWhile{ it {@code <} 3 } == [ 3, 2 ]
      * assert nums.dropWhile{ it != 2 } == [ 2 ]
      * assert nums.dropWhile{ it == 0 } == [ 1, 3, 2 ]
      * </pre>
@@ -11143,8 +11151,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *     Iterator<String> iterator() { "horse".iterator() }
      * }
      * def horse = new HorseIterable()
-     * assert horse.dropWhile{ it < 'r' } == ['r', 's', 'e']
-     * assert horse.dropWhile{ it <= 'r' } == ['s', 'e']
+     * assert horse.dropWhile{ it {@code <} 'r' } == ['r', 's', 'e']
+     * assert horse.dropWhile{ it {@code <=} 'r' } == ['s', 'e']
      * </pre>
      *
      * @param self      an Iterable
@@ -11166,9 +11174,9 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * true when passed each of the dropped entries (or key/value pairs).
      * <pre class="groovyTestCase">
      * def shopping = [milk:1, bread:2, chocolate:3]
-     * assert shopping.dropWhile{ it.key.size() < 6 } == [chocolate:3]
+     * assert shopping.dropWhile{ it.key.size() {@code <} 6 } == [chocolate:3]
      * assert shopping.dropWhile{ it.value % 2 } == [bread:2, chocolate:3]
-     * assert shopping.dropWhile{ k, v -> k.size() + v <= 7 } == [chocolate:3]
+     * assert shopping.dropWhile{ k, v {@code ->} k.size() + v {@code <=} 7 } == [chocolate:3]
      * </pre>
      * If the map instance does not have ordered keys, then this function could appear to drop random
      * entries. Groovy by default uses LinkedHashMap, so this shouldn't be an issue in the main.
@@ -11200,8 +11208,8 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * true when passed each of the dropped elements.
      * <pre class="groovyTestCase">
      * def nums = [ 1, 3, 2 ] as Integer[]
-     * assert nums.dropWhile{ it <= 3 } == [ ] as Integer[]
-     * assert nums.dropWhile{ it < 3 } == [ 3, 2 ] as Integer[]
+     * assert nums.dropWhile{ it {@code <=} 3 } == [ ] as Integer[]
+     * assert nums.dropWhile{ it {@code <} 3 } == [ 3, 2 ] as Integer[]
      * assert nums.dropWhile{ it != 2 } == [ 2 ] as Integer[]
      * assert nums.dropWhile{ it == 0 } == [ 1, 3, 2 ] as Integer[]
      * </pre>
@@ -11232,10 +11240,10 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * condition evaluates to true when passed each of the dropped elements.
      * <pre class="groovyTestCase">
      * def a = 0
-     * def iter = [ hasNext:{ a < 10 }, next:{ a++ } ] as Iterator
-     * assert [].iterator().dropWhile{ it < 3 }.toList() == []
-     * assert [1, 2, 3, 4, 5].iterator().dropWhile{ it < 3 }.toList() == [ 3, 4, 5 ]
-     * assert iter.dropWhile{ it < 5 }.toList() == [ 5, 6, 7, 8, 9 ]
+     * def iter = [ hasNext:{ a {@code <} 10 }, next:{ a++ } ] as Iterator
+     * assert [].iterator().dropWhile{ it {@code <} 3 }.toList() == []
+     * assert [1, 2, 3, 4, 5].iterator().dropWhile{ it {@code <} 3 }.toList() == [ 3, 4, 5 ]
+     * assert iter.dropWhile{ it {@code <} 5 }.toList() == [ 5, 6, 7, 8, 9 ]
      * </pre>
      *
      * @param self      the Iterator
@@ -12357,7 +12365,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      * def one = ['a', 'B', 'c', 'd']
      * def two = ['b', 'C', 'd', 'e']
-     * def compareIgnoreCase = { a, b -> a.toLowerCase() <=> b.toLowerCase() }
+     * def compareIgnoreCase = { a, b {@code ->} a.toLowerCase() {@code <=>} b.toLowerCase() }
      * assert one.intersect(two) == ['d']
      * assert two.intersect(one) == ['d']
      * assert one.intersect(two, compareIgnoreCase) == ['b', 'C', 'd']
@@ -13236,7 +13244,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * collections have their contents (recursively) added to the new SortedSet.
      * <pre class="groovyTestCase">
      * Set nested = [[0,1],[2],3,[4],5]
-     * SortedSet sorted = new TreeSet({ a, b -> (a instanceof List ? a[0] : a) <=> (b instanceof List ? b[0] : b) } as Comparator)
+     * SortedSet sorted = new TreeSet({ a, b {@code ->} (a instanceof List ? a[0] : a) {@code <=>} (b instanceof List ? b[0] : b) } as Comparator)
      * sorted.addAll(nested)
      * assert [0,1,2,3,4,5] as SortedSet == sorted.flatten()
      * </pre>
@@ -16008,9 +16016,11 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Iterates from this number down to the given number, inclusive,
      * decrementing by one each time.  Each number is passed to the closure.
      * Example:
-     * <pre>10.5.downto(0) {
+     * <pre>
+     * 10.5.downto(0) {
      *   println it
-     * }</pre>
+     * }
+     * </pre>
      * Prints numbers 10.5, 9.5 ... to 0.5.
      *
      * @param self    a BigDecimal
@@ -16050,9 +16060,11 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Iterates from this number up to the given number using a step increment.
      * Each intermediate number is passed to the given closure.  Example:
-     * <pre>0.step( 10, 2 ) {
+     * <pre>
+     * 0.step( 10, 2 ) {
      *   println it
-     * }</pre>
+     * }
+     * </pre>
      * Prints even numbers 0 through 8.
      *
      * @param self       a Number to start with
diff --git a/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
index 2ac7385..5a9754e 100644
--- a/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
@@ -478,7 +478,7 @@ public class IOGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre>
      * def s = 'The 3 quick\nbrown 4 fox'
      * def result = ''
-     * new StringReader(s).splitEachLine(/\d/){ parts ->
+     * new StringReader(s).splitEachLine(/\d/){ parts {@code ->}
      *     result += "${parts[0]}_${parts[1]}|"
      * }
      * assert result == 'The _ quick|brown _ fox|'
@@ -508,7 +508,7 @@ public class IOGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre>
      * def s = 'The 3 quick\nbrown 4 fox'
      * def result = ''
-     * new StringReader(s).splitEachLine(~/\d/){ parts ->
+     * new StringReader(s).splitEachLine(~/\d/){ parts {@code ->}
      *     result += "${parts[0]}_${parts[1]}|"
      * }
      * assert result == 'The _ quick|brown _ fox|'
diff --git a/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
index 3bdcb19..647f47d 100644
--- a/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
@@ -766,7 +766,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      * </pre>
      * or with some help from <code>ExpandoMetaClass</code>, you could do something like:
      * <pre>
-     * myFile.metaClass.setText = { String s -> delegate.setText(s, 'UTF-8') }
+     * myFile.metaClass.setText = { String s {@code ->} delegate.setText(s, 'UTF-8') }
      * myfile.text = 'some text'
      * </pre>
      *
@@ -1285,8 +1285,8 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre>
      * def totalSize = 0
      * def count = 0
-     * def sortByTypeThenName = { a, b ->
-     *     a.isFile() != b.isFile() ? a.isFile() <=> b.isFile() : a.name <=> b.name
+     * def sortByTypeThenName = { a, b {@code ->}
+     *     a.isFile() != b.isFile() ? a.isFile() {@code <=>} b.isFile() : a.name {@code <=>} b.name
      * }
      * rootDir.traverse(
      *         type         : FILES,
@@ -1296,7 +1296,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      *                         totalSize = 0; count = 0 },
      *         postRoot     : true
      *         sort         : sortByTypeThenName
-     * ) {it -> totalSize += it.size(); count++ }
+     * ) {it {@code ->} totalSize += it.size(); count++ }
      * </pre>
      *
      * @param self    a File (that happens to be a folder/directory)
@@ -1511,14 +1511,14 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      * // collect names of files in baseDir matching supplied regex pattern
      * import static groovy.io.FileType.*
      * def names = []
-     * baseDir.eachFileMatch FILES, ~/foo\d\.txt/, { names << it.name }
+     * baseDir.eachFileMatch FILES, ~/foo\d\.txt/, { names {@code <<} it.name }
      * assert names == ['foo1.txt', 'foo2.txt']
      *
      * // remove all *.bak files in baseDir
-     * baseDir.eachFileMatch FILES, ~/.*\.bak/, { File bak -> bak.delete() }
+     * baseDir.eachFileMatch FILES, ~/.*\.bak/, { File bak {@code ->} bak.delete() }
      *
-     * // print out files > 4K in size from baseDir
-     * baseDir.eachFileMatch FILES, { new File(baseDir, it).size() > 4096 }, { println "$it.name ${it.size()}" }
+     * // print out files &gt; 4K in size from baseDir
+     * baseDir.eachFileMatch FILES, { new File(baseDir, it).size() {@code >} 4096 }, { println "$it.name ${it.size()}" }
      * </pre>
      *
      * @param self       a File (that happens to be a folder/directory)
diff --git a/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
index 884f924..5040411 100644
--- a/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
@@ -537,7 +537,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * def text = "Groovy"
      * assert text.dropWhile{ false } == 'Groovy'
      * assert text.dropWhile{ true } == ''
-     * assert text.dropWhile{ it < 'Z' } == 'roovy'
+     * assert text.dropWhile{ it {@code <} 'Z' } == 'roovy'
      * assert text.dropWhile{ it != 'v' } == 'vy'
      * </pre>
      *
@@ -700,9 +700,9 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      * assert "Groovy".collectReplacements{ it == 'o' ? '_O_' : null } == 'Gr_O__O_vy'
      * assert "Groovy".collectReplacements{ it.equalsIgnoreCase('O') ? '_O_' : null } == 'Gr_O__O_vy'
-     * assert "Groovy".collectReplacements{ char c -> c == 'o' ? '_O_' : null } == 'Gr_O__O_vy'
-     * assert "Groovy".collectReplacements{ Character c -> c == 'o' ? '_O_' : null } == 'Gr_O__O_vy'
-     * assert "B&W".collectReplacements{ it == '&' ? '&amp;' : null } == 'B&amp;W'
+     * assert "Groovy".collectReplacements{ char c {@code ->} c == 'o' ? '_O_' : null } == 'Gr_O__O_vy'
+     * assert "Groovy".collectReplacements{ Character c {@code ->} c == 'o' ? '_O_' : null } == 'Gr_O__O_vy'
+     * assert "B&amp;W".collectReplacements{ {@code it == '&' ? '&' : null} } == 'B&amp;W'
      * </pre>
      *
      * @param orig the original String
@@ -972,19 +972,19 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * For example, if the pattern doesn't match, the result is null:
      * <pre class="groovyTestCase">
-     *     assert "New York, NY".find(~/\d{5}/) { match -> return "-$match-"} == null
+     *     assert "New York, NY".find(~/\d{5}/) { match {@code ->} return "-$match-"} == null
      * </pre>
      *
      * If it does match and we don't have any capture groups in our regex, there is a single parameter
      * on the closure that the match gets passed to:
      * <pre class="groovyTestCase">
-     *      assert "New York, NY 10292-0098".find(~/\d{5}/) { match -> return "-$match-"} == "-10292-"
+     *      assert "New York, NY 10292-0098".find(~/\d{5}/) { match {@code ->} return "-$match-"} == "-10292-"
      * </pre>
      *
      * If we have capture groups in our expression, our closure has one parameter for the match, followed by
      * one for each of the capture groups:
      * <pre class="groovyTestCase">
-     *      assert "New York, NY 10292-0098".find(~/(\d{5})-?(\d{4})/) { match, zip, plusFour ->
+     *      assert "New York, NY 10292-0098".find(~/(\d{5})-?(\d{4})/) { match, zip, plusFour {@code ->}
      *          assert match == "10292-0098"
      *          assert zip == "10292"
      *          assert plusFour == "0098"
@@ -995,7 +995,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * the closure will be passed an array with the first element corresponding to the whole match,
      * followed by an element for each of the capture groups:
      * <pre class="groovyTestCase">
-     *      assert "New York, NY 10292-0098".find(~/(\d{5})-?(\d{4})/) { array ->
+     *      assert "New York, NY 10292-0098".find(~/(\d{5})-?(\d{4})/) { array {@code ->}
      *          assert array[0] == "10292-0098"
      *          assert array[1] == "10292"
      *          assert array[2] == "0098"
@@ -1005,7 +1005,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * If a capture group is optional, and doesn't match, then the corresponding value
      * for that capture group passed to the closure will be null as illustrated here:
      * <pre class="groovyTestCase">
-     *      assert "adsf 233-9999 adsf".find(~/(\d{3})?-?(\d{3})-(\d{4})/) { match, areaCode, exchange, stationNumber ->
+     *      assert "adsf 233-9999 adsf".find(~/(\d{3})?-?(\d{3})-(\d{4})/) { match, areaCode, exchange, stationNumber {@code ->}
      *          assert "233-9999" == match
      *          assert null == areaCode
      *          assert "233" == exchange
@@ -1106,16 +1106,16 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * For example, if the regex doesn't match, it returns an empty list:
      * <pre class="groovyTestCase">
-     * assert "foo".findAll(/(\w*) Fish/) { match, firstWord -> return firstWord } == []
+     * assert "foo".findAll(/(\w*) Fish/) { match, firstWord {@code ->} return firstWord } == []
      * </pre>
      * Any regular expression matches are passed to the closure, if there are no capture groups, there will be one parameter for the match:
      * <pre class="groovyTestCase">
-     * assert "I could not, would not, with a fox.".findAll(/.ould/) { match -> "${match}n't"} == ["couldn't", "wouldn't"]
+     * assert "I could not, would not, with a fox.".findAll(/.ould/) { match {@code ->} "${match}n't"} == ["couldn't", "wouldn't"]
      * </pre>
      * If there are capture groups, the first parameter will be the match followed by one parameter for each capture group:
      * <pre class="groovyTestCase">
      * def orig = "There's a Wocket in my Pocket"
-     * assert orig.findAll(/(.)ocket/) { match, firstLetter -> "$firstLetter > $match" } == ["W > Wocket", "P > Pocket"]
+     * assert orig.findAll(/(.)ocket/) { match, firstLetter {@code ->} "$firstLetter {@code >} $match" } == ["W {@code >} Wocket", "P {@code >} Pocket"]
      * </pre>
      *
      * @param self    a CharSequence
@@ -1170,17 +1170,17 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * For example, if the pattern doesn't match, it returns an empty list:
      * <pre class="groovyTestCase">
-     * assert "foo".findAll(~/(\w*) Fish/) { match, firstWord -> return firstWord } == []
+     * assert "foo".findAll(~/(\w*) Fish/) { match, firstWord {@code ->} return firstWord } == []
      * </pre>
      * Any regular expression matches are passed to the closure, if there are no capture groups, there will be one
      * parameter for the match:
      * <pre class="groovyTestCase">
-     * assert "I could not, would not, with a fox.".findAll(~/.ould/) { match -> "${match}n't"} == ["couldn't", "wouldn't"]
+     * assert "I could not, would not, with a fox.".findAll(~/.ould/) { match {@code ->} "${match}n't"} == ["couldn't", "wouldn't"]
      * </pre>
      * If there are capture groups, the first parameter will be the match followed by one parameter for each capture group:
      * <pre class="groovyTestCase">
      * def orig = "There's a Wocket in my Pocket"
-     * assert orig.findAll(~/(.)ocket/) { match, firstLetter -> "$firstLetter > $match" } == ["W > Wocket", "P > Pocket"]
+     * assert orig.findAll(~/(.)ocket/) { match, firstLetter {@code ->} "$firstLetter {@code >} $match" } == ["W {@code >} Wocket", "P {@code >} Pocket"]
      * </pre>
      *
      * @param self    a CharSequence
@@ -2507,14 +2507,14 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">
      *     assert "hello world".replaceAll("(o)") { it[0].toUpperCase() } == "hellO wOrld"
      *
-     *     assert "foobar-FooBar-".replaceAll("(([fF][oO]{2})[bB]ar)", { Object[] it -> it[0].toUpperCase() }) == "FOOBAR-FOOBAR-"
+     *     assert "foobar-FooBar-".replaceAll("(([fF][oO]{2})[bB]ar)", { Object[] it {@code ->} it[0].toUpperCase() }) == "FOOBAR-FOOBAR-"
      *
      *     // Here,
      *     //   it[0] is the global string of the matched group
      *     //   it[1] is the first string in the matched group
      *     //   it[2] is the second string in the matched group
      *
-     *     assert "foobar-FooBar-".replaceAll("(([fF][oO]{2})[bB]ar)", { x, y, z -> z.toUpperCase() }) == "FOO-FOO-"
+     *     assert "foobar-FooBar-".replaceAll("(([fF][oO]{2})[bB]ar)", { x, y, z {@code ->} z.toUpperCase() }) == "FOO-FOO-"
      *
      *     // Here,
      *     //   x is the global string of the matched group
@@ -2576,14 +2576,14 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      *     //   it[1] is the first string in the matched group
      *     //   it[2] is the second string in the matched group
      *
-     *     assert "foobar-FooBar-".replaceAll(~"(([fF][oO]{2})[bB]ar)", { Object[] it -> it[0].toUpperCase() }) == "FOOBAR-FOOBAR-"
+     *     assert "foobar-FooBar-".replaceAll(~"(([fF][oO]{2})[bB]ar)", { Object[] it {@code ->} it[0].toUpperCase() }) == "FOOBAR-FOOBAR-"
      *
      *     // Here,
      *     //   it[0] is the global string of the matched group
      *     //   it[1] is the first string in the matched group
      *     //   it[2] is the second string in the matched group
      *
-     *     assert "foobar-FooBar-".replaceAll("(([fF][oO]{2})[bB]ar)", { x, y, z -> z.toUpperCase() }) == "FOO-FOO-"
+     *     assert "foobar-FooBar-".replaceAll("(([fF][oO]{2})[bB]ar)", { x, y, z {@code ->} z.toUpperCase() }) == "FOO-FOO-"
      *
      *     // Here,
      *     //   x is the global string of the matched group
@@ -3322,10 +3322,10 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * <pre class="groovyTestCase">
      * def text = "Groovy"
-     * assert text.takeWhile{ it < 'A' } == ''
-     * assert text.takeWhile{ it < 'Z' } == 'G'
+     * assert text.takeWhile{ it {@code <} 'A' } == ''
+     * assert text.takeWhile{ it {@code <} 'Z' } == 'G'
      * assert text.takeWhile{ it != 'v' } == 'Groo'
-     * assert text.takeWhile{ it < 'z' } == 'Groovy'
+     * assert text.takeWhile{ it {@code <} 'z' } == 'Groovy'
      * </pre>
      *
      * @param self      the original CharSequence
diff --git a/src/main/java/org/codehaus/groovy/tools/RootLoader.java b/src/main/java/org/codehaus/groovy/tools/RootLoader.java
index 84588da..46e0d5f 100644
--- a/src/main/java/org/codehaus/groovy/tools/RootLoader.java
+++ b/src/main/java/org/codehaus/groovy/tools/RootLoader.java
@@ -38,8 +38,7 @@ import java.util.Map;
  * classloaders. Normal is to first check parent and then look in
  * the resources you gave this classloader.
  * <p>
- * It's possible to add urls to the classpath at runtime through
- * {@link <a href="#addURL(URL)">addURL(URL)</a>}
+ * It's possible to add urls to the classpath at runtime through {@link #addURL(URL)}.
  * <p>
  * <b>Why using RootLoader?</b>
  * If you have to load classes with multiple classloaders and a
@@ -57,15 +56,17 @@ import java.util.Map;
  *           |
  *           |
  *       childLoader    (has classpath: a.jar;b.jar;c.jar)
- *       </pre>
+ * </pre>
  *
  * class C (from c.jar) extends B (from b.jar)
  *
  * childLoader.find("C")
- * --> parentLoader does know C.class, try to load it
- * --> to load C.class it has to load B.class
- * --> parentLoader is unable to find B.class in a.jar or c.jar
- * --> NoClassDefFoundException!
+ * <pre>
+ * --&gt; parentLoader does know C.class, try to load it
+ * --&gt; to load C.class it has to load B.class
+ * --&gt; parentLoader is unable to find B.class in a.jar or c.jar
+ * --&gt; NoClassDefFoundException!
+ * </pre>
  *
  * if childLoader had tried to load the class by itself, there
  * would be no problem. Changing childLoader to be a RootLoader
diff --git a/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java b/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java
index 55f22fb..ee0ce49 100644
--- a/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java
+++ b/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java
@@ -346,7 +346,7 @@ public abstract class StaticTypeCheckingSupport {
      *
      * @param params method parameters
      * @param args   type arguments
-     * @return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is
+     * @return -1 if arguments do not match, 0 if arguments are of the exact type and &gt; 0 when one or more argument is
      * not of the exact type but still match
      */
     public static int allParametersAndArgumentsMatch(Parameter[] params, ClassNode[] args) {


Mime
View raw message