-
Notifications
You must be signed in to change notification settings - Fork 123
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
[#859]:Allow SseEventSink.close() to throw IOException #863
Conversation
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.
LGTM - thanks @jimma!
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.
Ack! I spoke too soon. There is an error - this breaks one of the examples. CI output:
[INFO] -------------------------------------------------------------
615[ERROR] COMPILATION ERROR :
616[INFO] -------------------------------------------------------------
617[ERROR] /home/travis/build/eclipse-ee4j/jaxrs-api/examples/src/main/java/jaxrs/examples/sse/ServerSentEventsResource.java:[99,32] unreported exception java.io.IOException; must be caught or declared to be thrown
618[INFO] 1 error
619[INFO] -------------------------------------------------------------
Can you also change this example and any unit test cases that may not be handling the IOException?
e9b84dc
to
c51066e
Compare
@andymc12 Done. Thanks Andy. |
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 again for the changes!
Please see my comment. |
We had a longish discussion related to this proposal. On one side, someone suggested that calling close() should put an end to any further activity. My concern, on the other side, was that a failure to flush the stream upon closing was at least worth noting, whatever you choose to do about it. So I vote +1. But I think that @jansupol is right that this is a breaking change. So, +1 for merging to 4..0. |
I agree that the change should be done in a major version. Unfortunately we don't have a branch for 4.0 yet. And I don't think that we should create one now. So maybe we should park this one for a while? |
I added this PR to the milestone, so at least we don't forget it. :-) |
@jimma Please re-target this PR to branch 4.0-SNAPSHOT |
@jimma Can you please fix the conflicts please? Thanks! |
The base branch was changed.
@mkarg Done. Thanks. |
I personally would rather go with |
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.
I prefer IOException
over UncheckedIOException
TBH. I guess in most cases, users will catch and ignore (and maybe log) it. And with UncheckedIOException
it is too easy to miss catching it.
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.
This PR should include updates to the TCKs now (in our workspace). They won't compile with the addition of the new exception. Elsewhere our CI pipeline needs to be updated as well.
Fixed the tck. Thanks for the review @spericas |
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.
The TCK changes are here: 23f86b3 can these be merged now?
Thanks for the TCK changes |
No description provided.