Skip to content

Conversation

@tvernum
Copy link
Contributor

@tvernum tvernum commented Mar 5, 2020

The spirit of StreamInput/StreamOutput is that common I/O patterns should
be handled by these classes so that the persistence methods in
application classes can be kept short, which facilitates easy visual
comparison between read and write methods, and reduces risks of having
serialization issues due to mismatched implementations.

To this end, this change adds readOptionalVLong and writeOptionalVLong
methods to these classes as we have started to build up cases where
that conditional/null logic has been implemented directly in the read &
write methods.

The spirit of StreamInput/StreamOutput is that common I/O patterns should
be handled by these classes so that the persistence methods in
application classes can be kept short, which facilitates easy visual
comparison between read and write methods, and reduces risks of having
serialization issues due to mismatched implementations.

To this end, this change adds readOptionalVLong and writeOptionalVLong
methods to these classes as we have started to build up cases where
that conditional/null logic has been implemented directly in the read &
write methods.
@tvernum tvernum added >non-issue :Core/Infra/Core Core issues without another label v8.0.0 v7.7.0 labels Mar 5, 2020
@tvernum tvernum requested a review from jkakavas March 5, 2020 00:44
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

@tvernum
Copy link
Contributor Author

tvernum commented Mar 5, 2020

Relates: #52936 (comment)

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

LGTM

@tvernum tvernum merged commit 0b38b6a into elastic:master Mar 5, 2020
tvernum added a commit to tvernum/elasticsearch that referenced this pull request Mar 5, 2020
Updates SamlServiceProviderDocument to use the new
read/writeOptionalVLong methods from elastic#53145
@tvernum tvernum mentioned this pull request Mar 5, 2020
tvernum added a commit that referenced this pull request Mar 9, 2020
Updates SamlServiceProviderDocument to use the new
read/writeOptionalVLong methods from #53145
dakrone pushed a commit to dakrone/elasticsearch that referenced this pull request Mar 12, 2020
The spirit of StreamInput/StreamOutput is that common I/O patterns should
be handled by these classes so that the persistence methods in
application classes can be kept short, which facilitates easy visual
comparison between read and write methods, and reduces risks of having
serialization issues due to mismatched implementations.

To this end, this change adds readOptionalVLong and writeOptionalVLong
methods to these classes as we have started to build up cases where
that conditional/null logic has been implemented directly in the read &
write methods.
@dakrone
Copy link
Member

dakrone commented Mar 12, 2020

@tvernum I backported this in #53491 because I ended up relying on it for a separate PR, I hope you don't mind!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants