Removing use of deprecated method. Changed getMethod() -> method().