Java cleanup fix: ensure an Iterator<String> is passed instead of an Iterator<Object>