Small java version optimization