modify scala immutable collection to java.util.ArrayList