[ 
https://issues.apache.org/jira/browse/GROOVY-12489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131643#comment-18131643
 ] 

ASF GitHub Bot commented on GROOVY-12489:
-----------------------------------------

codecov-commenter commented on PR #3023:
URL: https://github.com/apache/groovy/pull/3023#issuecomment-6392124650

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3023?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 `84.00000%` with `4 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 72.5633%. Comparing base 
([`98c2f9f`](https://app.codecov.io/gh/apache/groovy/commit/98c2f9f106d2ee368278ca33d105e540bf23baf0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`2d5f20c`](https://app.codecov.io/gh/apache/groovy/commit/2d5f20c4e96c09b0789720bf2da7d753654b8959?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 8 commits behind head on master.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3023?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/ScriptBytecodeAdapter.java](https://app.codecov.io/gh/apache/groovy/pull/3023?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FScriptBytecodeAdapter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvU2NyaXB0Qnl0ZWNvZGVBZGFwdGVyLmphdmE=)
 | 0.0000% | [0 Missing and 3 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3023?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...haus/groovy/runtime/callsite/AbstractCallSite.java](https://app.codecov.io/gh/apache/groovy/pull/3023?src=pr&el=tree&filepath=subprojects%2Fgroovy-callsite%2Fsrc%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fcallsite%2FAbstractCallSite.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNhbGxzaXRlL3NyYy9tYWluL2phdmEvb3JnL2NvZGVoYXVzL2dyb292eS9ydW50aW1lL2NhbGxzaXRlL0Fic3RyYWN0Q2FsbFNpdGUuamF2YQ==)
 | 50.0000% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3023?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>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3023/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/3023?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3023        +/-   ##
   ==================================================
   + Coverage     72.5157%   72.5633%   +0.0476%     
   - Complexity      40761      40810        +49     
   ==================================================
     Files            1644       1645         +1     
     Lines          143027     143133       +106     
     Branches        26899      26932        +33     
   ==================================================
   + Hits           103717     103862       +145     
   + Misses          29759      29708        -51     
   - Partials         9551       9563        +12     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3023?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/GroovyObject.java](https://app.codecov.io/gh/apache/groovy/pull/3023?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FGroovyObject.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9Hcm9vdnlPYmplY3QuamF2YQ==)
 | `100.0000% <ø> (ø)` | |
   | 
[...oovy/internal/metaclass/GroovyObjectOverrides.java](https://app.codecov.io/gh/apache/groovy/pull/3023?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Finternal%2Fmetaclass%2FGroovyObjectOverrides.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9pbnRlcm5hbC9tZXRhY2xhc3MvR3Jvb3Z5T2JqZWN0T3ZlcnJpZGVzLmphdmE=)
 | `100.0000% <100.0000%> (ø)` | |
   | 
[...java/org/codehaus/groovy/vmplugin/v8/Selector.java](https://app.codecov.io/gh/apache/groovy/pull/3023?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.0720% <100.0000%> (+0.4429%)` | :arrow_up: |
   | 
[...haus/groovy/runtime/callsite/AbstractCallSite.java](https://app.codecov.io/gh/apache/groovy/pull/3023?src=pr&el=tree&filepath=subprojects%2Fgroovy-callsite%2Fsrc%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2Fcallsite%2FAbstractCallSite.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNhbGxzaXRlL3NyYy9tYWluL2phdmEvb3JnL2NvZGVoYXVzL2dyb292eS9ydW50aW1lL2NhbGxzaXRlL0Fic3RyYWN0Q2FsbFNpdGUuamF2YQ==)
 | `48.2759% <50.0000%> (+6.1410%)` | :arrow_up: |
   | 
[...codehaus/groovy/runtime/ScriptBytecodeAdapter.java](https://app.codecov.io/gh/apache/groovy/pull/3023?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FScriptBytecodeAdapter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvU2NyaXB0Qnl0ZWNvZGVBZGFwdGVyLmphdmE=)
 | `67.2897% <0.0000%> (+0.7009%)` | :arrow_up: |
   
   ... and [34 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3023/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>




> Dynamic property access fails or bypasses getProperty/setProperty when the 
> receiver class has no reflection metadata (GraalVM native image)
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12489
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12489
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> A dynamic property access that carries a sender has to know whether the 
> receiver overrides the {{setProperty}} or {{getProperty}} that 
> {{GroovyObject}} provides. Groovy answers this with {{Class.getMethod}} on 
> every access:
> * {{ScriptBytecodeAdapter.setProperty}}, {{setGroovyObjectProperty}} and 
> {{getProperty}} let any exception from the lookup escape.
> * The invokedynamic {{SetPropertySelector}} treats a failed lookup as an 
> override.
> * The invokedynamic {{PropertySelector}} goes to the meta-class instead, 
> reading around the class's own {{getProperty}}.
> Reflection over a class can fail while the class itself works. In a GraalVM 
> native image without reflection metadata for the class, {{getMethod}} throws 
> {{NoSuchMethodException}}. As a result, every write that carries a sender to 
> such an object fails, and so does every read through the adapter. Reads 
> through invokedynamic sites are answered by the meta-class instead, with a 
> {{MissingPropertyException}}, or, when the meta-class knows the property 
> through a registered superclass, with the wrong value and no error. 
> Applications such as Grails register every Groovy class for reflection only 
> so these checks can be answered. On the JVM, a public method naming a type 
> absent at run time makes the lookups throw {{NoClassDefFoundError}}. And 
> where reflection works, every access pays for a method search and a 
> {{Method}} copy.
> Proposed fix: cache each answer per class in a {{ClassValue}}, keeping the 
> existing criteria, and when reflection cannot answer, treat the class as 
> overriding so the access goes to the object's own method.
> PR: https://github.com/apache/groovy/pull/3023



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to