-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Introduce commentCharacter attribute in @Csv{File}Source
#5031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce commentCharacter attribute in @Csv{File}Source
#5031
Conversation
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvReaderFactory.java
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
@sbrannen, I’d like to update the User Guide and Release Notes, but other than that, it’s ready. UPD The User Guide and Release Notes updated ✔️ |
|
@marcphilipp, @sbrannen, I'm a bit confused 😅 . According to the compatibility scan, this new method is a source-incompatible change, even though it has a default value: char commentCharacter() default '#';Could you take a look?
|
Looks like that's a false-positive reported by japicmp: I hope that we can switch to roseau soon (see #5010) because it seems to be more precise. For now, I just pushed a commit adding the two new attributes to the list of "accepted breaking changes" even though we know they're not actually breaking. |
| * ❓ | ||
| * A regression introduced in version 6.0.0 caused an exception when using the | ||
| `@CsvSource` or `@CsvFileSource` annotations when the `delimiter` or | ||
| `delimiterString` attribute was set to #. This occurred because `#` was used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `delimiterString` attribute was set to #. This occurred because `#` was used | |
| `delimiterString` attribute was set to `#`. This occurred because `#` was used |
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvSource.java
Outdated
Show resolved
Hide resolved
|
Ahhh, good that that's already been reported. 👍
🤞
Oh man... I literally did that at the same time as you (perhaps even before you), but I was away from the computer and came back to find you'd already pushed the same fix. 😆 Though, I sorted the entries alphabetically. 😉 |
sbrannen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking very good! 👍
I've requested a few minor changes.
documentation/src/docs/asciidoc/release-notes/release-notes-6.0.1.adoc
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvReaderFactory.java
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvSource.java
Outdated
Show resolved
Hide resolved
jupiter-tests/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java
Outdated
Show resolved
Hide resolved
jupiter-tests/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java
Outdated
Show resolved
Hide resolved
jupiter-tests/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java
Show resolved
Hide resolved
jupiter-tests/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java
Outdated
Show resolved
Hide resolved
sbrannen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"looses" -> "loses"
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvSource.java
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/release-notes/release-notes-6.0.1.adoc
Outdated
Show resolved
Hide resolved
sbrannen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👍
Thanks for all the work you've put into this.
commentCharacter property in @Csv{File}SourcecommentCharacter attribute in @Csv{File}Source
My pleasure! |
|
Thank you, @vdmitrienko! 👍 |
The `@CsvSource` and `@CsvFileSource` annotations now allow specifying a custom comment character using the new `commentCharacter` attribute to resolve conflicts with using `#` as delimiter. Resolves #5028.

I hereby agree to the terms of the JUnit Contributor License Agreement.
#5028
Definition of Done
@APIannotations