hazelcast / hazelcast-nodejs-client

Hazelcast Node.js Client
https://hazelcast.com/clients/node-js/
Apache License 2.0
150 stars 58 forks source link

[TRACKING ISSUE] Disallow different types of generic records in GenericRecordBuilder.setGenericRecord API-1773 #1468

Open hz-devops-test opened 1 year ago

hz-devops-test commented 1 year ago

The tracking issue for the Java side PR.

See https://github.com/hazelcast/hazelcast/pull/23522 for details.


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):

Checklist:

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