[
https://issues.apache.org/jira/browse/GROOVY-12665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137692#comment-18137692
]
ASF GitHub Bot commented on GROOVY-12665:
-----------------------------------------
codecov-commenter commented on PR #3205:
URL: https://github.com/apache/groovy/pull/3205#issuecomment-6620114754
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3205?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 `95.62044%` with `6 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.2114%. Comparing base
([`0941dba`](https://app.codecov.io/gh/apache/groovy/commit/0941dbacf496a1667c27681c6fe76deee59bfb57?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`96b4ee3`](https://app.codecov.io/gh/apache/groovy/commit/96b4ee32672fffb4a871ccc0498e73acc3cd2dd3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 19 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3205?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...a/org/codehaus/groovy/runtime/IOGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FIOGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvSU9Hcm9vdnlNZXRob2RzLmphdmE=)
| 79.1667% | [4 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...apache/groovy/runtime/async/AsyncClosureUtils.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Fasync%2FAsyncClosureUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2FzeW5jL0FzeW5jQ2xvc3VyZVV0aWxzLmphdmE=)
| 97.1429% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3205?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/3205?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3205 +/- ##
==================================================
+ Coverage 74.1533% 74.2114% +0.0581%
- Complexity 43751 43781 +30
==================================================
Files 1692 1692
Lines 149516 149632 +116
Branches 28366 28376 +10
==================================================
+ Hits 110871 111044 +173
+ Misses 28448 28393 -55
+ Partials 10197 10195 -2
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3205?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[src/main/java/groovy/lang/Closure.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9DbG9zdXJlLmphdmE=)
| `86.0170% <100.0000%> (+1.0496%)` | :arrow_up: |
|
[src/main/java/groovy/lang/TrampolineClosure.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FTrampolineClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9UcmFtcG9saW5lQ2xvc3VyZS5qYXZh)
| `96.1538% <100.0000%> (+13.8009%)` | :arrow_up: |
|
[...a/org/codehaus/groovy/runtime/ComposedClosure.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FComposedClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvQ29tcG9zZWRDbG9zdXJlLmphdmE=)
| `96.0000% <100.0000%> (+18.7273%)` | :arrow_up: |
|
[...va/org/codehaus/groovy/runtime/CurriedClosure.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FCurriedClosure.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvQ3VycmllZENsb3N1cmUuamF2YQ==)
| `91.4894% <100.0000%> (+0.2806%)` | :arrow_up: |
|
[.../org/codehaus/groovy/runtime/memoize/LRUCache.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fmemoize%2FLRUCache.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvbWVtb2l6ZS9MUlVDYWNoZS5qYXZh)
| `94.4444% <ø> (ø)` | |
|
[...a/org/codehaus/groovy/runtime/memoize/Memoize.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fmemoize%2FMemoize.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvbWVtb2l6ZS9NZW1vaXplLmphdmE=)
| `92.5000% <100.0000%> (+14.2391%)` | :arrow_up: |
|
[...apache/groovy/runtime/async/AsyncClosureUtils.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fruntime%2Fasync%2FAsyncClosureUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9ydW50aW1lL2FzeW5jL0FzeW5jQ2xvc3VyZVV0aWxzLmphdmE=)
| `97.5610% <97.1429%> (-2.4390%)` | :arrow_down: |
|
[...a/org/codehaus/groovy/runtime/IOGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/3205?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FIOGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvSU9Hcm9vdnlNZXRob2RzLmphdmE=)
| `89.3300% <79.1667%> (-0.6700%)` | :arrow_down: |
... and [16 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3205/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>
> rehydrate() on a curried, writable, composed or trampolined closure throws
> ClassCastException or ignores the new owner and delegate
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12665
> URL: https://issues.apache.org/jira/browse/GROOVY-12665
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 4.0.33, 5.0.8, 5.1.3, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> class O { def foo() { 'o' } }
> class D { def foo() { 'd' } }
> def c = { x, y -> foo() + x + y }
> assert c.rehydrate(new D(), new O(), new O()).curry(1)(2) == 'o12' // passes
> assert c.curry(1).rehydrate(new D(), new O(), new O())(2) == 'o12' // fails
> {code}
> *Actual:* {{java.lang.ClassCastException: class O cannot be cast to class
> groovy.lang.Closure}}, thrown at {{CurriedClosure.getOwner}} from
> {{CurriedClosure.call}} (on 4.0.33 a MissingMethodException for O.doCall()).
> * {{c.curry(1).dehydrate()}} throws NullPointerException when called.
> * {{c.asWritable().rehydrate(...)}} throws the same ClassCastException.
> * For {{(c >> g).rehydrate(...)}} and {{c.trampoline().rehydrate(...)}} the
> new owner and delegate are ignored: {{foo()}} still resolves against the
> original owner.
> * {{dehydrate()}} on a composed or trampolined closure still holds the
> original owner, so the result cannot be serialized.
> *Expected:* rehydrating or dehydrating a wrapper closure behaves like
> rehydrating or dehydrating the closure it wraps and wrapping the copy.
> Cause: {{Closure.rehydrate}} and {{Closure.dehydrate}} replace only the
> wrapper's own owner, delegate and thisObject fields. {{CurriedClosure}} and
> {{Closure.WritableClosure}} keep the wrapped closure in owner, so it is
> overwritten. {{ComposedClosure}} and {{TrampolineClosure}} call through
> separate fields, so the wrapped closures are never rehydrated or dehydrated.
> Verified on 4.0.33, 5.0.8, 6.0.0 and master.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)