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

Disallow different types of generic records in GenericRecordBuilder.setGenericRecord API-1773 #23522

Conversation

srknzl
Copy link
Member

@srknzl srknzl commented Jan 30, 2023

Right now, GenericRecordBuilder.setGenericRecord does not throw if the value is not of the same type of generic record. (compact for compact, portable for portable)

We instead throw a cast exception while trying to do toData. We should do it during the setter.

Breaking changes (list specific methods/types/messages):

  • If some users were misusing the API, they may be affected

Checklist:

  • Labels (Team:, Type:, Source:, Module:) and Milestone set
  • Label Add to Release Notes or Not Release Notes content set
  • Request reviewers if possible
  • Send backports/forwardports if fix needs to be applied to past/future releases
  • New public APIs have @Nonnull/@Nullable annotations
  • New public APIs have @since tags in Javadoc

I don't think we need backports for this change.

@srknzl srknzl added this to the 5.3.0 milestone Jan 30, 2023
@srknzl srknzl requested a review from a team as a code owner January 30, 2023 23:00
@srknzl srknzl self-assigned this Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add to Release Notes All Languages Should Check Used by clients team to track fixes on the java client that should potentially backported to others Module: Serialization Source: Internal PR or issue was opened by an employee Team: Client Type: Defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants