[
https://issues.apache.org/jira/browse/GROOVY-12216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100419#comment-18100419
]
ASF GitHub Bot commented on GROOVY-12216:
-----------------------------------------
codecov-commenter commented on PR #2751:
URL: https://github.com/apache/groovy/pull/2751#issuecomment-5130832325
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2751?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
:x: Patch coverage is `76.31579%` with `18 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 69.9247%. Comparing base
([`4c9b312`](https://app.codecov.io/gh/apache/groovy/commit/4c9b31231fcca14f217a707cf43e866328d40b89?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`afa9b70`](https://app.codecov.io/gh/apache/groovy/commit/afa9b70db1d40c436a3daf510a5a5cfb0c60f6b2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2751?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[.../codehaus/groovy/runtime/DefaultGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2751?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FDefaultGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvRGVmYXVsdEdyb292eU1ldGhvZHMuamF2YQ==)
| 73.0769% | [10 Missing and 4 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2751?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...rg/codehaus/groovy/runtime/ArrayGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2751?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FArrayGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvQXJyYXlHcm9vdnlNZXRob2RzLmphdmE=)
| 83.3333% | [2 Missing and 2 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2751?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/groovy/pull/2751?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2751 +/- ##
==================================================
+ Coverage 69.9204% 69.9247% +0.0042%
- Complexity 35314 35331 +17
==================================================
Files 1555 1555
Lines 131192 131267 +75
Branches 24070 24082 +12
==================================================
+ Hits 91730 91788 +58
- Misses 31162 31171 +9
- Partials 8300 8308 +8
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2751?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...rg/codehaus/groovy/runtime/ArrayGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2751?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FArrayGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvQXJyYXlHcm9vdnlNZXRob2RzLmphdmE=)
| `88.8132% <83.3333%> (-0.0757%)` | :arrow_down: |
|
[.../codehaus/groovy/runtime/DefaultGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2751?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FDefaultGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvRGVmYXVsdEdyb292eU1ldGhvZHMuamF2YQ==)
| `75.0132% <73.0769%> (-0.0068%)` | :arrow_down: |
... and [4 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2751/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests,
report on failures, and find test suite problems.
- :package: [JS Bundle
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save
yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
> Fat-free twins for the fold/reduce DGM methods (inject, injectAll)
> ------------------------------------------------------------------
>
> Key: GROOVY-12216
> URL: https://issues.apache.org/jira/browse/GROOVY-12216
> Project: Groovy
> Issue Type: Sub-task
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
>
> h3. Summary
> Sub-task of GROOVY-12205. Adds functional-interface twins for the fold/reduce
> family. Grouped together because they share one design decision — the
> {{BinaryOperator}} vs {{BiFunction}} choice and how it pairs with the
> {{initialValue}} overloads — so the type conventions are settled once.
> {{inject}} on {{Iterable}} already has both twins (from GROOVY-12054); this
> completes the remaining receivers.
> ({{sum}} was originally grouped here but is split out — its twin collides
> positionally with an existing {{Object initialValue}} overload; see the
> separate {{sum}} item.)
> h3. Type convention
> * No-initial-value forms (2-arg reduce): {{BinaryOperator<T>}}.
> * Initial-value forms (3-arg reduce): {{BiFunction<? super U, ? super E, ?
> extends U>}}, matching the existing {{inject(Iterable, U, BiFunction)}}.
> No collision risk: in both methods the reduce function sits in a distinct
> trailing position after any explicit {{initialValue}} parameter, so it never
> competes with the initial value for overload selection.
> h3. Methods
> ||Method||Closure overloads without a twin||Functional type||Receivers||
> |{{inject}}|8|{{BinaryOperator<T>}} (no init) / {{BiFunction<? super U, ?
> super E, ? extends U>}} (init)|no-init: Object, {{E[]}}, Collection;
> with-init: Object, Iterator, Map, {{E[]}}, Collection|
> |{{injectAll}}|5|{{BinaryOperator<T>}} (no init) / {{BiFunction}}
> (init)|no-init: Iterable, Iterator; with-init: Iterable, Iterator, Map|
> Total: 13 new overloads.
> h3. Conventions (per GROOVY-12054)
> * PECS wildcards; {{@since 6.0.0}}; inline javadoc example via {{<pre
> class="language-groovy groovyTestCase">}} cross-linking the {{Closure}}
> counterpart with {{@link}}.
> * Plain single-SAM overloads only — not {{@Incubating}}.
> h3. Compatibility
> * *{{inject}} arity*: since {{BinaryOperator<T> extends BiFunction<T,T,T>}},
> the no-init ({{BinaryOperator}}, 2-arg) and with-init ({{BiFunction}}, 3-arg)
> forms stay distinct by arity — no erasure clash, mirroring the existing
> {{Iterable}} pair.
> * Existing closure/lambda call sites unaffected; method references and typed
> functional values select the twin under {{@CompileStatic}} (GROOVY-12214).
> Only check: an existing {{@CompileStatic}} call passing a literal {{null}} to
> a currently-single-overload form would become ambiguous — grep-checkable,
> resolved with a cast if found.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)