Companion code for JDK 8 @Contended article