Make it compile without deprecated method

Authored by mlaurent on Oct 16 2019, 5:14 AM.