LPS-44342 Use Java6 compliant code

Pushed to upstream