5.13. APIs (Java)

5.13.1. [Major] DynamicData API now supports setting and getting wchar fields

The DynamicData Java API did not provide a way to use wchar data fields. It now allows working with wide character (wchar) fields, including sequences and arrays. Specifically, the implementation of the following APIs was enhanced:

  • set_char and get_char: now accept char values representing a wchar.

  • set_char_array and get_char_array: now accept char[] with values representing a wchar.

  • set_char_seq and get_char_seq: now accept WcharSeq.

Wide characters in the context of the Java API are restricted to Unicode BMP characters—that is, characters representable as 16-bit integers. These map directly to Java’s char primitive type, a 16-bit unsigned value, and so a new API was not needed.

[RTI Issue ID CORE-5933]

5.13.2. [Major] Possible data serialization error for keyed DataReaders using XCDR2 format

Java applications subscribing to some data types with keys may have printed an error such as the following:

Exception in thread "Thread-7" com.rti.dds.cdr.IllegalCdrStateException: not enough available space in CDR buffer

This may have caused the DataReader to not receive data.

This problem only affected certain non-mutable types when the XCDR2 format was used (the default is XCDR).

[RTI Issue ID CORE-13888]

5.13.3. [Minor] “data_to_string” of DynamicDataTypeSupport failed with exception

When using the DynamicDataTypeSupport’s data_to_string operation, an exception was raised with the following error:

java.lang.IllegalStateException: (de)serialization of dynamic types should take place in native code

While this made it impossible to transform DynamicData samples into strings using DynamicDataTypeSupport, it was still possible to transform DynamicData samples into strings using the instance method to_string.

[RTI Issue ID CORE-14325]