SONARJAVA-99 Don't use deprecated methods