[
https://issues.apache.org/jira/browse/GROOVY-12295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18107723#comment-18107723
]
ASF GitHub Bot commented on GROOVY-12295:
-----------------------------------------
codecov-commenter commented on PR #2831:
URL: https://github.com/apache/groovy/pull/2831#issuecomment-5406493559
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2831?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 `92.10526%` with `3 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 70.6308%. Comparing base
([`56964ab`](https://app.codecov.io/gh/apache/groovy/commit/56964ab775786f5be385d4feb2aab9df028813d1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`857d0fd`](https://app.codecov.io/gh/apache/groovy/commit/857d0fdb55f14e043069273a3ea99c3421061d21?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/2831?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...roovy-csv/src/main/java/groovy/csv/CsvSlurper.java](https://app.codecov.io/gh/apache/groovy/pull/2831?src=pr&el=tree&filepath=subprojects%2Fgroovy-csv%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fcsv%2FCsvSlurper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNzdi9zcmMvbWFpbi9qYXZhL2dyb292eS9jc3YvQ3N2U2x1cnBlci5qYXZh)
| 92.1053% | [1 Missing and 2 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2831?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/2831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2831 +/- ##
==================================================
+ Coverage 70.6170% 70.6308% +0.0137%
- Complexity 36498 36512 +14
==================================================
Files 1571 1571
Lines 133911 133936 +25
Branches 24681 24685 +4
==================================================
+ Hits 94564 94600 +36
+ Misses 30824 30819 -5
+ Partials 8523 8517 -6
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2831?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...roovy-csv/src/main/java/groovy/csv/CsvSlurper.java](https://app.codecov.io/gh/apache/groovy/pull/2831?src=pr&el=tree&filepath=subprojects%2Fgroovy-csv%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fcsv%2FCsvSlurper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNzdi9zcmMvbWFpbi9qYXZhL2dyb292eS9jc3YvQ3N2U2x1cnBlci5qYXZh)
| `83.5165% <92.1053%> (+10.7892%)` | :arrow_up: |
... and [13 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2831/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>
> CsvSlurper: parsing fails with useHeader=false despite documented
> auto-generated column names
> ---------------------------------------------------------------------------------------------
>
> Key: GROOVY-12295
> URL: https://issues.apache.org/jira/browse/GROOVY-12295
> Project: Groovy
> Issue Type: Bug
> Reporter: Paul King
> Priority: Major
>
> The javadoc for {{CsvSlurper#parse(Reader)}} states:
> {quote}When {{useHeader}} is false, maps are keyed by auto-generated column
> names.{quote}
> No such auto-generation exists. With {{useHeader=false}}, any non-empty input
> fails:
> {code:groovy}
> new groovy.csv.CsvSlurper().setUseHeader(false).parseText('1,2\n3,4')
> {code}
> throws:
> {noformat}
> groovy.csv.CsvRuntimeException
> Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException:
> Cannot construct instance of `java.util.LinkedHashMap` (although at least one
> Creator exists):
> no String-argument constructor/factory method to deserialize from String
> value ('1')
> {noformat}
> *Cause:* {{buildSchema()}} with {{useHeader=false}} produces an empty
> {{CsvSchema}} with no columns. jackson-dataformat-csv then presents each row
> as an array of strings rather than an object, which cannot bind to {{Map}},
> so the entire untyped {{useHeader=false}} path is broken, not just an edge
> case.
> *Possible resolutions:*
> # Implement the documented behavior: peek at the first row to determine the
> column count and generate names (e.g. {{column1}}..{{columnN}}), building the
> schema from those.
> # Return a list of string lists (one per row) when {{useHeader}} is false,
> and adjust the docs accordingly.
> # Keep current behavior but fix the javadoc and fail fast with a clear error
> message.
> Since the module is still {{@Incubating}}, any of these can be adopted
> without compatibility concerns.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)