sonatype-lift[bot] commented on code in PR #1785:
URL: https://github.com/apache/groovy/pull/1785#discussion_r984915130


##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -6246,123 +6126,39 @@ private static Object sum(Iterator<?> self, Object 
initialValue, boolean first)
         return result;
     }
 
-    /**
-     * Sums the items in an array, adding the result to some initial value.
-     * <pre class="groovyTestCase">assert (5+1+2+3+4 as byte) == ([1,2,3,4] as 
byte[]).sum(5 as byte)</pre>
-     *
-     * @param self         an array of values to sum
-     * @param initialValue the items in the array will be summed to this 
initial value
-     * @return The sum of all of the items.
-     * @since 2.4.2
-     */
+    @Deprecated
     public static byte sum(byte[] self, byte initialValue) {
-        byte s = initialValue;
-        for (byte v : self) {
-            s += v;
-        }
-        return s;
+        return ArrayGroovyMethods.sum(self, initialValue);
     }
 
-    /**
-     * Sums the items in an array, adding the result to some initial value.
-     * <pre class="groovyTestCase">assert (5+1+2+3+4 as short) == ([1,2,3,4] 
as short[]).sum(5 as short)</pre>
-     *
-     * @param self         an array of values to sum
-     * @param initialValue the items in the array will be summed to this 
initial value
-     * @return The sum of all of the items.
-     * @since 2.4.2
-     */
+    @Deprecated
     public static short sum(short[] self, short initialValue) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.sum(self, initialValue)", 
imports = "org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737426&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737426&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737426&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737426&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737426&lift_comment_rating=5)
 ]



##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -6567,112 +6363,34 @@ public static Object average(Iterator<?> self) {
         return result;
     }
 
-    /**
-     * Calculates the average of the bytes in the array.
-     * <pre class="groovyTestCase">assert 5.0G == ([2,4,6,8] as 
byte[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static BigDecimal average(byte[] self) {
-        long s = 0;
-        int count = 0;
-        for (byte v : self) {
-            s += v;
-            count++;
-        }
-        return BigDecimal.valueOf(s).divide(BigDecimal.valueOf(count));
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the shorts in the array.
-     * <pre class="groovyTestCase">assert 5.0G == ([2,4,6,8] as 
short[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static BigDecimal average(short[] self) {
-        long s = 0;
-        int count = 0;
-        for (short v : self) {
-            s += v;
-            count++;
-        }
-        return BigDecimal.valueOf(s).divide(BigDecimal.valueOf(count));
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the ints in the array.
-     * <pre class="groovyTestCase">assert 5.0G == ([2,4,6,8] as 
int[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static BigDecimal average(int[] self) {
-        long s = 0;
-        int count = 0;
-        for (int v : self) {
-            s += v;
-            count++;
-        }
-        return BigDecimal.valueOf(s).divide(BigDecimal.valueOf(count));
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the longs in the array.
-     * <pre class="groovyTestCase">assert 5.0G == ([2,4,6,8] as 
long[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static BigDecimal average(long[] self) {
-        long s = 0;
-        int count = 0;
-        for (long v : self) {
-            s += v;
-            count++;
-        }
-        return BigDecimal.valueOf(s).divide(BigDecimal.valueOf(count));
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the floats in the array.
-     * <pre class="groovyTestCase">assert 5.0d == ([2,4,6,8] as 
float[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static double average(float[] self) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.average(self)", imports = 
"org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737429&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737429&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737429&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737429&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737429&lift_comment_rating=5)
 ]



##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -3178,116 +3179,44 @@ public static <T> Number count(T[] self, 
@ClosureParams(FirstParam.Component.cla
         return count(Arrays.asList(self), closure);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(int[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(long[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(short[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(char[] self, Object value) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.count(self, value)", imports 
= "org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737447&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737447&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737447&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737447&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737447&lift_comment_rating=5)
 ]



##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -6567,112 +6363,34 @@ public static Object average(Iterator<?> self) {
         return result;
     }
 
-    /**
-     * Calculates the average of the bytes in the array.
-     * <pre class="groovyTestCase">assert 5.0G == ([2,4,6,8] as 
byte[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static BigDecimal average(byte[] self) {
-        long s = 0;
-        int count = 0;
-        for (byte v : self) {
-            s += v;
-            count++;
-        }
-        return BigDecimal.valueOf(s).divide(BigDecimal.valueOf(count));
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the shorts in the array.
-     * <pre class="groovyTestCase">assert 5.0G == ([2,4,6,8] as 
short[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static BigDecimal average(short[] self) {
-        long s = 0;
-        int count = 0;
-        for (short v : self) {
-            s += v;
-            count++;
-        }
-        return BigDecimal.valueOf(s).divide(BigDecimal.valueOf(count));
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the ints in the array.
-     * <pre class="groovyTestCase">assert 5.0G == ([2,4,6,8] as 
int[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static BigDecimal average(int[] self) {
-        long s = 0;
-        int count = 0;
-        for (int v : self) {
-            s += v;
-            count++;
-        }
-        return BigDecimal.valueOf(s).divide(BigDecimal.valueOf(count));
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the longs in the array.
-     * <pre class="groovyTestCase">assert 5.0G == ([2,4,6,8] as 
long[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static BigDecimal average(long[] self) {
-        long s = 0;
-        int count = 0;
-        for (long v : self) {
-            s += v;
-            count++;
-        }
-        return BigDecimal.valueOf(s).divide(BigDecimal.valueOf(count));
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the floats in the array.
-     * <pre class="groovyTestCase">assert 5.0d == ([2,4,6,8] as 
float[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static double average(float[] self) {
-        double s = 0.0d;
-        int count = 0;
-        for (float v : self) {
-            s += v;
-            count++;
-        }
-        return s/count;
+        return ArrayGroovyMethods.average(self);
     }
 
-    /**
-     * Calculates the average of the doubles in the array.
-     * <pre class="groovyTestCase">assert 5.0d == ([2,4,6,8] as 
double[]).average()</pre>
-     *
-     * @param self The array of values to calculate the average of
-     * @return The average of the items
-     * @since 3.0.0
-     */
+    @Deprecated
     public static double average(double[] self) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.average(self)", imports = 
"org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737452&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737452&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737452&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737452&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737452&lift_comment_rating=5)
 ]



##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -6103,88 +6032,39 @@ public static Object sum(Iterator<Object> self) {
         return sum(self, null, true);
     }
 
-    /**
-     * Sums the items in an array.
-     * <pre class="groovyTestCase">assert (1+2+3+4 as byte) == ([1,2,3,4] as 
byte[]).sum()</pre>
-     *
-     * @param self The array of values to add together
-     * @return The sum of all of the items
-     * @since 2.4.2
-     */
+    @Deprecated
     public static byte sum(byte[] self) {
-        return sum(self, (byte) 0);
+        return ArrayGroovyMethods.sum(self);
     }
 
-    /**
-     * Sums the items in an array.
-     * <pre class="groovyTestCase">assert (1+2+3+4 as short) == ([1,2,3,4] as 
short[]).sum()</pre>
-     *
-     * @param self The array of values to add together
-     * @return The sum of all of the items
-     * @since 2.4.2
-     */
+    @Deprecated
     public static short sum(short[] self) {
-        return sum(self, (short) 0);
+        return ArrayGroovyMethods.sum(self);
     }
 
-    /**
-     * Sums the items in an array.
-     * <pre class="groovyTestCase">assert 1+2+3+4 == ([1,2,3,4] as 
int[]).sum()</pre>
-     *
-     * @param self The array of values to add together
-     * @return The sum of all of the items
-     * @since 2.4.2
-     */
+    @Deprecated
     public static int sum(int[] self) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.sum(self)", imports = 
"org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737478&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737478&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737478&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737478&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737478&lift_comment_rating=5)
 ]



##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -3178,116 +3179,44 @@ public static <T> Number count(T[] self, 
@ClosureParams(FirstParam.Component.cla
         return count(Arrays.asList(self), closure);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(int[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(long[] self, Object value) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.count(self, value)", imports 
= "org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737485&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737485&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737485&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737485&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737485&lift_comment_rating=5)
 ]



##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -3178,116 +3179,44 @@ public static <T> Number count(T[] self, 
@ClosureParams(FirstParam.Component.cla
         return count(Arrays.asList(self), closure);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(int[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(long[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(short[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(char[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(boolean[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(double[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(float[] self, Object value) {
-        return count(InvokerHelper.asIterator(self), value);
+        return ArrayGroovyMethods.count(self, value);
     }
 
-    /**
-     * Counts the number of occurrences of the given value inside this array.
-     * Comparison is done using Groovy's == operator (using
-     * <code>compareTo(value) == 0</code> or <code>equals(value)</code> ).
-     *
-     * @param self  the array within which we count the number of occurrences
-     * @param value the value being searched for
-     * @return the number of occurrences
-     * @since 1.6.4
-     */
+    @Deprecated
     public static Number count(byte[] self, Object value) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.count(self, value)", imports 
= "org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737509&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737509&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737509&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737509&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737509&lift_comment_rating=5)
 ]



##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -7549,84 +7195,44 @@ public static <T> IntRange getIndices(T[] self) {
         return new IntRange(false, 0, self.length);
     }
 
-    /**
-     * Returns indices of the boolean array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(boolean[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the byte array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(byte[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the char array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(char[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the double array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(double[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the float array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(float[] self) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.getIndices(self)", imports = 
"org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737543&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737543&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737543&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737543&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737543&lift_comment_rating=5)
 ]



##########
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:
##########
@@ -7549,84 +7195,44 @@ public static <T> IntRange getIndices(T[] self) {
         return new IntRange(false, 0, self.length);
     }
 
-    /**
-     * Returns indices of the boolean array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(boolean[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the byte array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(byte[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the char array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(char[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the double array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(double[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the float array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(float[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the int array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(int[] self) {
-        return new IntRange(false, 0, self.length);
+        return ArrayGroovyMethods.getIndices(self);
     }
 
-    /**
-     * Returns indices of the long array.
-     *
-     * @see #getIndices(Object[])
-     * @since 3.0.8
-     */
+    @Deprecated
     public static IntRange getIndices(long[] self) {

Review Comment:
   *[InlineMeSuggester](https://errorprone.info/bugpattern/InlineMeSuggester):* 
 This deprecated API looks inlineable. If you'd like the body of the API to be 
inlined to its callers, please annotate it with @InlineMe.
   
   ---
   
   
   ```suggestion
       @InlineMe(replacement = "ArrayGroovyMethods.getIndices(self)", imports = 
"org.codehaus.groovy.runtime.ArrayGroovyMethods")
   ```
   
   
   
   ---
   
   <details><summary><b>â„šī¸ Learn about @sonatype-lift commands</b></summary>
   
   You can reply with the following commands. For example, reply with 
***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this 
PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified 
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see 
its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) 
to add LiftBot to another repo.</sub></details>
   
   
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=340737538&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737538&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737538&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=340737538&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=340737538&lift_comment_rating=5)
 ]



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to