The point of the AtomicReference was to avoid locking (synchronized block).

Why is the use of AtomicReference in this case "incorrect"?