Improve usage of java.util.List API