Updating the API to the new API

JAVA-1325
What's the warning that's being suppressed here?