Backport from java8 images