jdk7 , jdk8 , design pattern. cakes