javaee-samples/javaee7-samples — pull request #210 by marschall (2014-03-27 21:09:46+00:00)
Title: Clean up Whiteboard Sample

The whiteboard sample suffers from a potential
`ConcurrentModificationException` because the peers `Set` is iterated
over while other threads can mutate it. Iteration does not block
mutation from other threads. To quote
[Collections.html#synchronizedSet](http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedSet(java.util.Set))

> It is imperative that the user manually synchronize on the returned
> set when iterating over it.
> Failure to follow this advice may result in non-deterministic
> behavior.

In addition the following issues are fixed:

- use proper logging instead of `System.out.println`
- fix typos in log statements