See https://github.com/spring-projects/spring-boot/pull/40181
Comment From: bclozel
List.of(...) does not allow null elements and is immutable, unlike Arrays.asList(...). Are you sure all those changes are in line with this? As for the case of heap pollution, I don't see where this happens in our codebase (we don't cast lists as far as I can see) nor how List.of prevents the same.
Comment From: quaff
List.of(...)does not allownullelements and is immutable, unlikeArrays.asList(...).
They are same except that Arrays.asList(...) does accept null and allow set(int index, E element), that is rarely used and error prone we should avoid.
Comment From: wilkinsona
Thanks for the PR but we considered such a change in the past and decided against it.