Added @Deprecated Java annotation to decprecated method