[
https://issues.apache.org/jira/browse/GROOVY-11927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18073030#comment-18073030
]
ASF GitHub Bot commented on GROOVY-11927:
-----------------------------------------
codecov-commenter commented on PR #2465:
URL: https://github.com/apache/groovy/pull/2465#issuecomment-4233171635
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2465?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 `68.29268%` with `26 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 66.4982%. Comparing base
([`eb7e7d4`](https://app.codecov.io/gh/apache/groovy/commit/eb7e7d45d1daddc5ef0d0164556f57a657df3ec4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`bb81411`](https://app.codecov.io/gh/apache/groovy/commit/bb814112ab79f9a2425a23d5fbd5d65e977fefbb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2465?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...java/org/apache/groovy/xml/util/JacksonHelper.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=subprojects%2Fgroovy-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fxml%2Futil%2FJacksonHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXhtbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L3htbC91dGlsL0phY2tzb25IZWxwZXIuamF2YQ==)
| 50.0000% | [6 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...groovy-xml/src/main/java/groovy/xml/XmlParser.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=subprojects%2Fgroovy-xml%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fxml%2FXmlParser.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXhtbC9zcmMvbWFpbi9qYXZhL2dyb292eS94bWwvWG1sUGFyc2VyLmphdmE=)
| 52.9412% | [8 Missing :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[.../src/main/java/groovy/xml/XmlRuntimeException.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=subprojects%2Fgroovy-xml%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fxml%2FXmlRuntimeException.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXhtbC9zcmMvbWFpbi9qYXZhL2dyb292eS94bWwvWG1sUnVudGltZUV4Y2VwdGlvbi5qYXZh)
| 0.0000% | [6 Missing :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[src/main/java/groovy/util/Node.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Futil%2FNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvdXRpbC9Ob2RlLmphdmE=)
| 94.5946% | [1 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...rg/apache/groovy/xml/extensions/XmlExtensions.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=subprojects%2Fgroovy-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fxml%2Fextensions%2FXmlExtensions.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXhtbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L3htbC9leHRlbnNpb25zL1htbEV4dGVuc2lvbnMuamF2YQ==)
| 75.0000% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2465?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/2465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2465 +/- ##
==================================================
+ Coverage 66.4927% 66.4982% +0.0055%
- Complexity 30313 30340 +27
==================================================
Files 1415 1417 +2
Lines 118213 118295 +82
Branches 21003 21015 +12
==================================================
+ Hits 78603 78664 +61
- Misses 33125 33139 +14
- Partials 6485 6492 +7
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2465?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...rg/apache/groovy/xml/extensions/XmlExtensions.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=subprojects%2Fgroovy-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fxml%2Fextensions%2FXmlExtensions.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXhtbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L3htbC9leHRlbnNpb25zL1htbEV4dGVuc2lvbnMuamF2YQ==)
| `60.0000% <75.0000%> (+10.0000%)` | :arrow_up: |
|
[src/main/java/groovy/util/Node.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Futil%2FNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvdXRpbC9Ob2RlLmphdmE=)
| `85.9327% <94.5946%> (+1.1051%)` | :arrow_up: |
|
[.../src/main/java/groovy/xml/XmlRuntimeException.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=subprojects%2Fgroovy-xml%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fxml%2FXmlRuntimeException.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXhtbC9zcmMvbWFpbi9qYXZhL2dyb292eS94bWwvWG1sUnVudGltZUV4Y2VwdGlvbi5qYXZh)
| `0.0000% <0.0000%> (ø)` | |
|
[...groovy-xml/src/main/java/groovy/xml/XmlParser.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=subprojects%2Fgroovy-xml%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fxml%2FXmlParser.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXhtbC9zcmMvbWFpbi9qYXZhL2dyb292eS94bWwvWG1sUGFyc2VyLmphdmE=)
| `68.7943% <52.9412%> (+6.6976%)` | :arrow_up: |
|
[...java/org/apache/groovy/xml/util/JacksonHelper.java](https://app.codecov.io/gh/apache/groovy/pull/2465?src=pr&el=tree&filepath=subprojects%2Fgroovy-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fxml%2Futil%2FJacksonHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LXhtbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L3htbC91dGlsL0phY2tzb25IZWxwZXIuamF2YQ==)
| `50.0000% <50.0000%> (ø)` | |
... and [2 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2465/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>
> Add toMap() and typed parsing support to XmlParser
> --------------------------------------------------
>
> Key: GROOVY-11927
> URL: https://issues.apache.org/jira/browse/GROOVY-11927
> Project: Groovy
> Issue Type: Improvement
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
>
> Add {{Node.toMap()}} for converting XML node trees to nested Maps, and
> {{XmlParser.parseTextAs()}} / {{parseAs()}} for typed XML parsing via Jackson
> databinding.
> Three levels of support:
> * `node.toMap()` — zero-dependency conversion to `Map<String, Object>`,
> usable standalone
> * `node as MyType` — coercion via `toMap()` + Groovy's named-param
> constructor (works for String-typed properties, no additional deps)
> * `parser.parseTextAs(Type, xml)` — full typed conversion (String→int,
> boolean, etc.) plus `@JsonProperty`/`@JsonFormat` support; requires
> `jackson-databind` at runtime, throws clear error if absent
> Also adds {{XmlRuntimeException}} and an internal {{JacksonHelper}} utility
> using reflective access to avoid a compile-time Jackson dependency on
> {{groovy-xml}}.
> {code:groovy}
> static class ServerConfig {
> String host
> int port
> boolean debug
> }
> def config = new XmlParser().parseTextAs(ServerConfig, '''
> <server>
> <host>localhost</host>
> <port>8080</port>
> <debug>true</debug>
> </server>'''.stripIndent())
> assert config instanceof ServerConfig
> assert config.host == 'localhost'
> assert config.port == 8080
> assert config.debug == true
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)