[
https://issues.apache.org/jira/browse/GROOVY-11807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18092213#comment-18092213
] ASF GitHub Bot commented on GROOVY-11807: ----------------------------------------- codecov-commenter commented on PR #2641: URL: https://github.com/apache/groovy/pull/2641#issuecomment-4828159106 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2641?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report :white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 68.5476%. Comparing base ([`a7d75a5`](https://app.codecov.io/gh/apache/groovy/commit/a7d75a57117601c17687f0724ccd2f73016f4ebe?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c1cfd73`](https://app.codecov.io/gh/apache/groovy/commit/c1cfd7336b23005b8882fdadb65a9edfa17cf122?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)). :warning: Report is 5 commits behind head on master. <details><summary>Additional details and impacted files</summary> [](https://app.codecov.io/gh/apache/groovy/pull/2641?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #2641 +/- ## ================================================== + Coverage 68.5420% 68.5476% +0.0055% - Complexity 33730 33739 +9 ================================================== Files 1523 1523 Lines 127923 127936 +13 Branches 23251 23252 +1 ================================================== + Hits 87681 87697 +16 + Misses 32464 32459 -5 - Partials 7778 7780 +2 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2641?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [.../codehaus/groovy/runtime/DefaultGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2641?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FDefaultGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvRGVmYXVsdEdyb292eU1ldGhvZHMuamF2YQ==) | `74.9933% <100.0000%> (+0.0401%)` | :arrow_up: | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2641/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> > MapWithDefault can break type safety of key set > ----------------------------------------------- > > Key: GROOVY-11807 > URL: https://issues.apache.org/jira/browse/GROOVY-11807 > Project: Groovy > Issue Type: Bug > Components: groovy-jdk > Reporter: Eric Milles > Assignee: Paul King > Priority: Major > > {code} > Map<Number,?> map = [:].withDefault{ null } > assert map.get('x') == null > Number k = map.keySet()[0] > {code} > GroovyCastException: Cannot cast object 'x' with class 'java.lang.String' to > class 'java.lang.Number' -- This message was sent by Atlassian Jira (v8.20.10#820010)
