Adding a warning for an obsolete method