LPS-44913 Change deprecated method usage to the correct one

this has been changed for master, so 6.2 is fine no need to send changes there.