Tinkerforge/generators — pull request #24 by NobodysNightmare (2012-09-20 09:07:41+00:00)
Title: Java: Building a device-name should respect NUL-Termination

There is an open discussion in the forums, because the Java-Bindings don't shorten the device-name when the first NUL occurs.

This fix adds a NUL-check to the append-loop and also introduces the use of a StringBuilder instead of String-concatenation. The reason for the latter change is the same as in my C# Pull Request ("it is faster").

Commit was only compile-tested