fix a bunch of java deprecation warnings