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

[#859]:Allow SseEventSink.close() to throw IOException #863

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

jimma
Copy link
Contributor

@jimma jimma commented Apr 20, 2020

No description provided.

Copy link
Contributor

@andymc12 andymc12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks @jimma!

Copy link
Contributor

@andymc12 andymc12 left a 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?

@jimma jimma force-pushed the 3.1-SNAPSHOT branch 4 times, most recently from e9b84dc to c51066e Compare April 22, 2020 07:54
@jimma
Copy link
Contributor Author

jimma commented Apr 22, 2020

@andymc12 Done. Thanks Andy.

chkal
chkal previously approved these changes Apr 22, 2020
andymc12
andymc12 previously approved these changes Apr 22, 2020
Copy link
Contributor

@andymc12 andymc12 left a 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!

@jansupol
Copy link
Contributor

Please see my comment.

@ronsigal
Copy link
Contributor

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.

@chkal
Copy link
Contributor

chkal commented May 30, 2020

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?

@mkarg mkarg added this to the 4.0 (formerly 3.0) milestone May 30, 2020
@mkarg
Copy link
Contributor

mkarg commented May 30, 2020

I added this PR to the milestone, so at least we don't forget it. :-)

@spericas
Copy link
Contributor

spericas commented Jul 7, 2021

@jimma Please re-target this PR to branch 4.0-SNAPSHOT

@mkarg
Copy link
Contributor

mkarg commented Sep 5, 2022

@jimma Can you please fix the conflicts please? Thanks!

@jimma jimma changed the base branch from 3.1-SNAPSHOT to master September 7, 2022 07:39
@jimma jimma dismissed stale reviews from andymc12 and chkal September 7, 2022 07:39

The base branch was changed.

@jimma
Copy link
Contributor Author

jimma commented Sep 7, 2022

@mkarg Done. Thanks.

asoldano
asoldano previously approved these changes Sep 7, 2022
@mkarg mkarg requested review from andymc12 and chkal September 7, 2022 13:17
@mkarg
Copy link
Contributor

mkarg commented Sep 7, 2022

I personally would rather go with UncheckedIOException instead of IOException, so the caller still can catch if he likes, but is not forced to catch-or-throw.

chkal
chkal previously approved these changes Sep 11, 2022
Copy link
Contributor

@chkal chkal left a 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.

Copy link
Contributor

@spericas spericas left a 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.

@jimma jimma dismissed stale reviews from chkal and asoldano via 23f86b3 September 23, 2022 02:34
@jimma
Copy link
Contributor Author

jimma commented Sep 23, 2022

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

Copy link

@asoldano asoldano left a 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?

@spericas
Copy link
Contributor

The TCK changes are here: 23f86b3 can these be merged now?

Thanks for the TCK changes

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

Successfully merging this pull request may close these issues.

8 participants