Fixes Java API to work with the new tryAccept API