spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Use java.util.List.of for creation of unmodifiable lists

Open wilkinsona opened this issue 4 years ago • 1 comments

wilkinsona avatar Oct 02 '21 07:10 wilkinsona

Placing this on-hold because we've decided to approach this on a case-by-case basis for new usages. There are subtle differences between List.of() and the equivalent Collections method such as contains(null) throwing an NPE which aren't suitable for a blanket search and replace.

mbhave avatar Aug 03 '22 17:08 mbhave

Would love to contribute in java and algos. If you have any such set of work ,consider me in.

Abhishekverma2002 avatar Sep 23 '22 08:09 Abhishekverma2002

I think we can close this one and adapt to List.of in new code or when we touch existing classes. Doing an entire sweep at this point doesn't seem worth it.

philwebb avatar Oct 04 '22 01:10 philwebb