Details
Description
setResponder is not synchronized (responder not volatile) and called from a different thread to hasResponder.
Although hasResponder is synchronized and will get the latest version from main memory dropping its thread cache , there is no obvious guarantee that the thread calling setResponder has hit a memory barrier and forced its new responder value to main memory so hasResponder method can return an unexpected result as it will get the latest one from memory but not from the other threads cache that may not have been pushed to main memory yet.
change setResponder to be synchronized.
public synchronized void setResponder(Responder responder)