The class NonBlockingStatsDClient is not thread-safe (and presumably it should be). The reason for this is that a static NumberFormat instance is shared among all threads, but this class itself is not thread-safe. See the "synchronization" section of the NumberFormat docs:
http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html
To fix this problem, either create a new NumberFormat for each call, or create one per thread, using a ThreadLocal<NumberFormat>
http://stackoverflow.com/questions/1285279/java-synchronization-issue-with-numberformat
The class
NonBlockingStatsDClientis not thread-safe (and presumably it should be). The reason for this is that a staticNumberFormatinstance is shared among all threads, but this class itself is not thread-safe. See the "synchronization" section of theNumberFormatdocs:http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html
To fix this problem, either create a new NumberFormat for each call, or create one per thread, using a
ThreadLocal<NumberFormat>http://stackoverflow.com/questions/1285279/java-synchronization-issue-with-numberformat