-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
JsonParser should not resume or pause the source wrapped read stream when it is ended #2790
Comments
can you provide a reproducer for the issue ? |
what is actually calling resume ? it is not clear |
I have added stable links to the original comments.
I can do that, though I think the linked example should reproduce the issue as well. |
ok, we will check the example |
Just wanted to let you know :) making this small change in io.vertx.core.parsetools.implJsonParserImpl if (currentToken == null) {
if (ended) {
if (endHandler != null) {
endHandler.handle(null);
}
return; // <-- here we need to skip rest of the method if file reading is ended
}
break;
} allows to read entire file (and AsyncFileImpl is also closed). Unfortunately there is no tests for parser implementation so I am not sure whether it doesn't breaks something other :| |
there is |
Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Provide fix and test for eclipse-vertx#2790 Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Provide fix and test for #2790 Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
Provide fix and test for #2790 Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com> Signed-off-by: Kowalczyk <bkowalczyyk@gmail.com>
We have implemented streaming Json from an AsyncFile as shown in this example. This has worked nicely before 3.6.0 but now results in a
java.lang.IllegalStateException: File handle is closed
in 3.6.2.Based on some debugging, the following happens:
io.vertx.core.parsetools.impl.JsonParserImpl#end
callsio.vertx.core.parsetools.impl.JsonParserImpl#checkPending
which will call theendHandler
.endHandler
closes the AsyncFileio.vertx.core.streams.ReadStream#resume
is called (on the already closed stream)exceptionHandler
is called with the above exceptionAs far as I can see, issue #2584 and PR #2583 seems to be related.
Is the example outdated? Should we handle file closing in some other way?
The text was updated successfully, but these errors were encountered: