5.15. APIs (Java)

5.15.1. [Critical] Java keyhash calculation error with mutable types in XCDR

A keyhash calculation error occurs in the Java implementation for mutable types using XCDR encoding, when one of the following conditions is met:

  • The type’s maximum serialized size exceeds 65 KB and the key is not primitive.

  • At least one key member has a member ID greater than 16128.

Under these conditions, the keyhash is incorrectly computed, leading to interoperability issues between Java and other language implementations. Specifically, identical data instances produced by different writers are incorrectly treated as distinct, resulting in erroneous instance identification.

Now, if you unset the bit java_keyhash_750 in the Extensible Types Compliance Mask (by default, it is set in releases 7.3.0 and 7.3.1 to avoid breaking Java backward compatibility), Java will calculate the keyhash correctly, generating the same keyhash as the other language bindings, and the same keyhash as Java versions newer than release 7.5.0.

[RTI Issue ID CORE-15710]

5.15.2. [Major] Unnecessary memory operations when receiving bounded sequences

DataReaders receiving samples containing bounded sequences in the Java API may have incurred unnecessary memory operations. Receiving samples in these scenarios should now be more memory-efficient.

The new behavior has been turned off by default in this release of Connext, but can be switched on by calling LoanableSequence.setEnableObjectReuse(true) before creating any DataReaders.

[RTI Issue ID CORE-14667]