Can't say that this really is a bug, but it's somewhat annoying.
The libraryVersion-property of the Version-class contains a trailing ACSII NULL-character (\0), in logfiles it shows up like a additional white space ("[Z-Wave 3.99 ]"), and when I try to copy a large block of a stackdump in Linux my editors truncate the texts when they hit the \0-character.
Open up the file in the Chrome browser shows the characters as questionmarks:
screen dump
I guess it's a side effect of the conversion from a null-terminated bytearray to a String in the Version-class constructor. Java strings are normally not null-terminated (see page 342 in specs).
I have not tried it, but I guess adding a simple replace() in the constructor could fix it, like this:
libraryVersion = new String(buffer.readBytes(12).array()).replace('\0', '');
Can't say that this really is a bug, but it's somewhat annoying. The libraryVersion-property of the Version-class contains a trailing ACSII NULL-character (\0), in logfiles it shows up like a additional white space ("[Z-Wave 3.99 ]"), and when I try to copy a large block of a stackdump in Linux my editors truncate the texts when they hit the \0-character.
Here are an example file: zwave.txt
Open up the file in the Chrome browser shows the characters as questionmarks: screen dump
I guess it's a side effect of the conversion from a null-terminated bytearray to a String in the Version-class constructor. Java strings are normally not null-terminated (see page 342 in specs).
I have not tried it, but I guess adding a simple replace() in the constructor could fix it, like this:
libraryVersion = new String(buffer.readBytes(12).array()).replace('\0', '');