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

[rest] refactored the Stream2JSONInputStream to simplify the logic #4099

Merged
merged 1 commit into from
Mar 10, 2024

Conversation

joerg1985
Copy link
Contributor

Description

This PR will use the SequenceInputStream to simplify the logic for the Stream2JSONInputStream.
All interface methods can now be delegated to the SequenceInputStream, this makes it easy to support methods like:

  • public int read(byte @Nullable [] b, int off, int len) throws IOException
  • public long transferTo(OutputStream target) throws IOException

@joerg1985 joerg1985 requested a review from a team as a code owner February 19, 2024 17:50
@joerg1985 joerg1985 force-pushed the SequenceInputStream branch 2 times, most recently from 376175d to 3e571d9 Compare February 19, 2024 19:22
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhab-4-2-milestone-discussion/154316/18

@joerg1985
Copy link
Contributor Author

@J-N-K could you have a look at this one too? Thanks in advance

Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

In general a good improvement. I have left some comments.

Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
@joerg1985 joerg1985 force-pushed the SequenceInputStream branch from 3e571d9 to d51feb6 Compare March 10, 2024 15:44
@joerg1985
Copy link
Contributor Author

@J-N-K i have updated the PR, thanks for the review!

@J-N-K J-N-K added the enhancement An enhancement or new feature of the Core label Mar 10, 2024
@J-N-K J-N-K added this to the 4.2 milestone Mar 10, 2024
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@J-N-K J-N-K merged commit 3d83c70 into openhab:main Mar 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants