[
https://issues.apache.org/jira/browse/GROOVY-12580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134543#comment-18134543
]
ASF GitHub Bot commented on GROOVY-12580:
-----------------------------------------
codecov-commenter commented on PR #3096:
URL: https://github.com/apache/groovy/pull/3096#issuecomment-6512319219
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3096?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 `86.66667%` with `4 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 73.6774%. Comparing base
([`5b077f9`](https://app.codecov.io/gh/apache/groovy/commit/5b077f9dcf610898e3415f1f1cebbaab8eecab61?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`3d60af0`](https://app.codecov.io/gh/apache/groovy/commit/3d60af007158ee2356d1b9932f786dd76be98a35?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 4 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3096?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...vy/vmplugin/v8/IndyGuardsFiltersAndSignatures.java](https://app.codecov.io/gh/apache/groovy/pull/3096?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FIndyGuardsFiltersAndSignatures.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0luZHlHdWFyZHNGaWx0ZXJzQW5kU2lnbmF0dXJlcy5qYXZh)
| 40.0000% | [1 Missing and 2 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3096?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...java/org/codehaus/groovy/vmplugin/v8/Selector.java](https://app.codecov.io/gh/apache/groovy/pull/3096?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FSelector.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L1NlbGVjdG9yLmphdmE=)
| 92.8571% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3096?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/3096?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3096 +/- ##
==================================================
+ Coverage 73.6711% 73.6774% +0.0063%
- Complexity 42584 42594 +10
==================================================
Files 1678 1678
Lines 146907 146931 +24
Branches 27790 27795 +5
==================================================
+ Hits 108228 108255 +27
+ Misses 28528 28523 -5
- Partials 10151 10153 +2
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3096?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...java/org/codehaus/groovy/reflection/ClassInfo.java](https://app.codecov.io/gh/apache/groovy/pull/3096?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FClassInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vQ2xhc3NJbmZvLmphdmE=)
| `87.2951% <100.0000%> (+0.5998%)` | :arrow_up: |
|
[...dehaus/groovy/reflection/GroovyClassValueSoft.java](https://app.codecov.io/gh/apache/groovy/pull/3096?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Freflection%2FGroovyClassValueSoft.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3JlZmxlY3Rpb24vR3Jvb3Z5Q2xhc3NWYWx1ZVNvZnQuamF2YQ==)
| `86.4865% <ø> (ø)` | |
|
[...java/org/codehaus/groovy/vmplugin/v8/Selector.java](https://app.codecov.io/gh/apache/groovy/pull/3096?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FSelector.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L1NlbGVjdG9yLmphdmE=)
| `81.1352% <92.8571%> (-0.1043%)` | :arrow_down: |
|
[...vy/vmplugin/v8/IndyGuardsFiltersAndSignatures.java](https://app.codecov.io/gh/apache/groovy/pull/3096?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fvmplugin%2Fv8%2FIndyGuardsFiltersAndSignatures.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0luZHlHdWFyZHNGaWx0ZXJzQW5kU2lnbmF0dXJlcy5qYXZh)
| `87.9518% <40.0000%> (-3.0738%)` | :arrow_down: |
... and [14 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3096/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>
> ClassInfo.remove takes a class's default Groovy methods with it
> ---------------------------------------------------------------
>
> Key: GROOVY-12580
> URL: https://issues.apache.org/jira/browse/GROOVY-12580
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 4.0.33, 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {{ClassInfo.remove(Class)}} drops the class's association, and the next use
> of the class creates a new {{ClassInfo}}. The default Groovy methods and
> extension methods of a class are written into its {{ClassInfo}} once, by the
> registry at startup, so the class loses them for the rest of the runtime's
> life:
> {code:groovy}
> import org.codehaus.groovy.reflection.ClassInfo
> ClassInfo.remove(StringBuilder)
> def sb = new StringBuilder('ab')
> sb[0..0] = 'z' // MissingMethodException: No signature of method: putAt for
> class: java.lang.StringBuilder
> {code}
> {{sb << 'x'}} falls back to {{CharSequence.leftShift}}, which returns a new
> builder and leaves {{sb}} empty, or to {{Appendable.leftShift}}, depending on
> hash order. After the sweep the integration guide documents for application
> shutdown, a runtime still in use loses every default Groovy method:
> {code:groovy}
> import org.codehaus.groovy.reflection.ClassInfo
> for (ClassInfo ci : ClassInfo.getAllClassInfo()) { Class<?> c =
> ci.getTheClass(); if (c != null) ClassInfo.remove(c) }
> [1, 2, 3].collect { it * 2 } // MissingMethodException: No signature of
> method: multiply for class: java.lang.Integer
> {code}
> {{bugs.Groovy12142.testClassInfoRemoveSweepIsSafeToRunRepeatedly}} removes
> the {{ClassInfo}} of {{StringBuilder}}, so {{bugs.Groovy12363}}, whose
> anonymous class does {{sink << who}}, fails when it runs later in the same
> test JVM.
> The guide's sweep, written as dynamic Groovy and run by the copy it cleans
> up, also keeps that copy's class loader reachable, since a dynamic call made
> after the first removal associates a class with that runtime again.
> PR: https://github.com/apache/groovy/pull/3096
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)