Fix the build with newer versions of Java
PR: 244776 Submitted by: Michael Osipov <michael.osipov@siemens.com>