Code compatible with changes in future JDKs (ADHI-4918)