[
https://issues.apache.org/jira/browse/GROOVY-12569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134544#comment-18134544
]
ASF GitHub Bot commented on GROOVY-12569:
-----------------------------------------
codecov-commenter commented on PR #3098:
URL: https://github.com/apache/groovy/pull/3098#issuecomment-6512328917
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3098?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 `78.96825%` with `53 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 73.7175%. 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
([`b0aa14e`](https://app.codecov.io/gh/apache/groovy/commit/b0aa14e21d9a3f91fdeb8dda6ff88f103af8e3a1?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/3098?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...sc/StaticTypesMethodReferenceExpressionWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesMethodReferenceExpressionWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc01ldGhvZFJlZmVyZW5jZUV4cHJlc3Npb25Xcml0ZXIuamF2YQ==)
| 77.7778% | [4 Missing and 14 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...groovy/classgen/asm/sc/StaticInvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticInvocationWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNJbnZvY2F0aW9uV3JpdGVyLmphdmE=)
| 79.4118% | [2 Missing and 12 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...ovy/classgen/asm/sc/StaticTypesCallSiteWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesCallSiteWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc0NhbGxTaXRlV3JpdGVyLmphdmE=)
| 77.7778% | [1 Missing and 7 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...rg/codehaus/groovy/classgen/AsmClassGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FAsmClassGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0FzbUNsYXNzR2VuZXJhdG9yLmphdmE=)
| 71.4286% | [1 Missing and 5 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...rm/sc/transformers/ConstructorCallTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FConstructorCallTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQ29uc3RydWN0b3JDYWxsVHJhbnNmb3JtZXIuamF2YQ==)
| 86.3636% | [0 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...groovy/classgen/asm/sc/StaticTypesTypeChooser.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesTypeChooser.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc1R5cGVDaG9vc2VyLmphdmE=)
| 77.7778% | [0 Missing and 2 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...vy/classgen/asm/MethodPointerExpressionWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FMethodPointerExpressionWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9NZXRob2RQb2ludGVyRXhwcmVzc2lvbldyaXRlci5qYXZh)
| 87.5000% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3098?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/3098?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=)
| 50.0000% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3098?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/3098?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3098 +/- ##
==================================================
+ Coverage 73.6711% 73.7175% +0.0464%
- Complexity 42584 42734 +150
==================================================
Files 1678 1678
Lines 146907 147132 +225
Branches 27790 27882 +92
==================================================
+ Hits 108228 108462 +234
+ Misses 28528 28482 -46
- Partials 10151 10188 +37
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3098?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/GroovyClassLoader.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FGroovyClassLoader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9Hcm9vdnlDbGFzc0xvYWRlci5qYXZh)
| `73.7500% <100.0000%> (+0.2652%)` | :arrow_up: |
|
[...va/org/codehaus/groovy/classgen/asm/MopWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FMopWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9Nb3BXcml0ZXIuamF2YQ==)
| `85.8974% <100.0000%> (+0.1831%)` | :arrow_up: |
|
[...vy/classgen/asm/MethodPointerExpressionWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FMethodPointerExpressionWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9NZXRob2RQb2ludGVyRXhwcmVzc2lvbldyaXRlci5qYXZh)
| `95.4546% <87.5000%> (-4.5455%)` | :arrow_down: |
|
[...java/org/codehaus/groovy/vmplugin/v8/Selector.java](https://app.codecov.io/gh/apache/groovy/pull/3098?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.4381% <50.0000%> (+0.1986%)` | :arrow_up: |
|
[...groovy/classgen/asm/sc/StaticTypesTypeChooser.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesTypeChooser.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc1R5cGVDaG9vc2VyLmphdmE=)
| `92.8571% <77.7778%> (-7.1429%)` | :arrow_down: |
|
[...rm/sc/transformers/ConstructorCallTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FConstructorCallTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQ29uc3RydWN0b3JDYWxsVHJhbnNmb3JtZXIuamF2YQ==)
| `94.1606% <86.3636%> (-1.0007%)` | :arrow_down: |
|
[...rg/codehaus/groovy/classgen/AsmClassGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FAsmClassGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0FzbUNsYXNzR2VuZXJhdG9yLmphdmE=)
| `85.4651% <71.4286%> (-0.1650%)` | :arrow_down: |
|
[...ovy/classgen/asm/sc/StaticTypesCallSiteWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesCallSiteWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc0NhbGxTaXRlV3JpdGVyLmphdmE=)
| `80.0789% <77.7778%> (+2.1163%)` | :arrow_up: |
|
[...groovy/classgen/asm/sc/StaticInvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticInvocationWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNJbnZvY2F0aW9uV3JpdGVyLmphdmE=)
| `76.2646% <79.4118%> (+0.8221%)` | :arrow_up: |
|
[...sc/StaticTypesMethodReferenceExpressionWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3098?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesMethodReferenceExpressionWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc01ldGhvZFJlZmVyZW5jZUV4cHJlc3Npb25Xcml0ZXIuamF2YQ==)
| `87.0670% <77.7778%> (-2.0087%)` | :arrow_down: |
... and [28 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3098/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>
> SC: a package-private class of another GroovyClassLoader compilation fails
> with IllegalAccessError where dynamic code works
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12569
> URL: https://issues.apache.org/jira/browse/GROOVY-12569
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> A class that is not public is accessible only within its run-time package
> (JVMS 5.4.4), and the JVM checks that wherever an instruction names the
> class. Dynamic code uses a package-private class of an earlier
> {{GroovyShell}} parse, or of a library used by a script, without naming it.
> Statically compiled code names it and fails:
> {code:groovy}
> def shell = new GroovyShell()
> shell.evaluate '''package p
> @groovy.transform.PackageScope class Hidden implements Runnable {
> static String sm() { 'sm' }
> String name
> String own() { 'own' }
> void run() { }
> }
> true
> '''
> shell.evaluate '''package p
> @groovy.transform.CompileStatic
> def test() {
> def h = new Hidden(name: 'x')
> h.run()
> Runnable r = h
> [Hidden.sm(), h.own(), h.name]
> }
> test()
> ''' // each line fails with IllegalAccessError; without @CompileStatic it
> works
> {code}
> Expected: as in dynamic code, {{new}} and static members go through the
> meta-class, a method is called through a public superclass or interface that
> declares it (else the meta-class), and a value of the class is held as its
> nearest public superclass. A variable declared with the class, a cast to it
> and {{instanceof}} still fail, as in dynamic code. Classes compiled to class
> files are used directly.
> PR: https://github.com/apache/groovy/pull/3098
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)