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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2372?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.11111%` with `5 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 67.0677%. Comparing base 
([`c8ed37e`](https://app.codecov.io/gh/apache/groovy/commit/c8ed37ef49d68b9bd57ef572d8ffea42ff57c70f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`78ebdc7`](https://app.codecov.io/gh/apache/groovy/commit/78ebdc7c120587c85623b0fb668f942edc469612?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/2372?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/2372?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
 | 86.1111% | [1 Missing and 4 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2372?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/2372/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/2372?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2372        +/-   ##
   ==================================================
   + Coverage     67.0634%   67.0677%   +0.0044%     
   - Complexity      29442      29445         +3     
   ==================================================
     Files            1382       1382                
     Lines          116214     116199        -15     
     Branches        20471      20469         -2     
   ==================================================
   - Hits            77937      77932         -5     
   + Misses          31799      31792         -7     
   + Partials         6478       6475         -3     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2372?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/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/2372?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
 | `78.0138% <86.1111%> (+0.0969%)` | :arrow_up: |
   
   ... and [6 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2372/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>




> static propertyMissing catches inherited static methods
> -------------------------------------------------------
>
>                 Key: GROOVY-5359
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5359
>             Project: Groovy
>          Issue Type: Improvement
>          Components: groovy-runtime
>            Reporter: OC
>            Assignee: Eric Milles
>            Priority: Minor
>              Labels: performance
>
> When static missing properties are catched, the handler is called also when 
> an inherited static method is called.
> It is not a serious problem, but it feels weird. Either it should be changed 
> (if possible with reasonably small effort), or thoroughly documented.
> Also, it should be documented that if the handler throws a 
> MissingPropertyException, it gets silently eaten up and the static method is 
> called all right. On the other hand, any other exception goes all the way up 
> to the user-level harness if any, which is generally rather undesirable.
> Here's a code sample which illustrates the problem, along with the proper 
> exception thrown so as the method is properly called:
> {code}
> class Foo {
>  static def inheritedStaticMethod() {
>    println "Allright, Kilroy's here"
>  }
> }
> class Test extends Foo {
>   static def main(av) {
>     // need to catch all class-level missing properties
>     Object.metaClass.static.propertyMissing={
>       println "Property $it of ${delegate.simpleName} missing."
>       // simulated 'found valid dynamic property' case
>       if (it.startsWith('f')) return "(${delegate.simpleName}.$it OK)"
>       // oops, we did not find valid d.p, so we 
>       throw new MissingPropertyException("No valid DP for 
> ${delegate.simpleName}.$it")
>     }
>     println "Checking the handler: ${Object.foo} ${Foo.foo} ${Test.foo} 
> ${String.foo}"
>     inheritedStaticMethod()
>   }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to