-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
Bug in FilteringParserDelegate #649
Comments
@jhaber I see you added this test case to The number of expected matches should be 1 here as you mentioned above. So this should be removed as a failing test since the assert is incorrect? |
When I opened this issue the test was failing even before it got to that assertion. The filter was somehow causing Jackson to generate invalid JSON (I was getting a JSON object with a key but no value):
I just checked out the 2.14 branch and seems like it's now generating the expected JSON, so the underlying bug must've been fixed at some point 😄 Now the test is just failing because of the match count assert. Updating the assertion to 1 makes sense to me, it was probably just an oversight that it was originally asserting 0 |
Could this be due to #715 added to 2.14? I'd be super happy to merge a PR to fix the test, move it from under |
Seems possible, either that or the fixes for #700. I can send a PR, does it matter which branch I send the PR to? |
Earliest branch where test passes; if things work in 2.13, ideally 2.13, if 2.14 then that branch. Either way, I can then merge forward the changes so no need to worry about later branches. |
There seems to be a bug in
FilteringParserDelegate
that specifically manifests when trying to filter out arrays. Here's a test that reproduces the behavior (can be added toBasicParserFilteringTest
):This test fails with:
I discovered this bug while adding test coverage for #573. However, I confirmed that the bug exists in jackson-core versions 2.8.9, 2.9.10, 2.10.5, and 2.11.3 (and therefore wasn't introduced in #573).
No one has complained yet, and a quick GitHub search suggests there isn't much code in the wild (if any) doing
filterStartArray() { return null; }
so I don't think it's a high priority to fix this. I mainly just wanted to log this issue so that I can link to it (above the commented out unit test)The text was updated successfully, but these errors were encountered: