Skip to content
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

csv should support the empty string as the parameter instead of throwing java.lang.NullPointerException #1370

Closed
thleqel opened this issue Nov 9, 2020 · 3 comments
Assignees

Comments

@thleqel
Copy link

thleqel commented Nov 9, 2020

I am testing a micro-service that returns the response content-type as text/csv. If there is no data, it still returns an empty string.

I use Karate csv keyword to convert the response to json for further verification. Everything works fine except when there is an empty response, the scripts throw java.lang.NullPointerException, instead of returning an empty json.

The issue can be reproduce by this:
* csv mycsv = ""

@ptrthomas ptrthomas self-assigned this Nov 9, 2020
@ptrthomas ptrthomas added this to the 1.0.0 milestone Nov 9, 2020
@thleqel
Copy link
Author

thleqel commented Nov 9, 2020

@ptrthomas I can create a PR to fix this if you like.

@ptrthomas
Copy link
Member

@thleqel thanks for offering, since we are actively prepping a new branch the fix will go there so we'll do it

@ptrthomas
Copy link
Member

1.0 released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants