Work around a bug in some java version.