So this ugly workaround can be removed for both Java 8 and Java 6.