Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
refactoring: CodeSelectorPModel do double copy of collectio in c-tor #3555
not clear why ....
referenced this issue
Nov 16, 2016
The array copy is most likely because we are worried about the list being modified from outside the class from where it was originally generated.
The list is generated here, which does another array copy and 'unmodifiable'.
I think the code at MainFrameModel.java#L177 is valid. All the other array copies and 'unmodifiable' may be just extra protection to make sure we are not passing around a list that can be modified. One class won't know what its children are doing with it.