adventure icon indicating copy to clipboard operation
adventure copied to clipboard

Make use of Java 9+ immutable collections

Open kashike opened this issue 4 years ago • 3 comments

kashike avatar Oct 02 '21 08:10 kashike

Could we possibly have more of a description on what this is achieving and what adventure is trying to change with the use of immutable collections.

CoreyShupe avatar Oct 24 '21 08:10 CoreyShupe

components are immutable, hence things like Lists, stored on components, are immutable; Right now the project is using Guavas immutable lists, aim here I'd imagine is to get away from Guava's given that java now offers their own standard implementations of these

electronicboy avatar Oct 24 '21 08:10 electronicboy

We don't use Guava, but we do a lot of stuff like Collections.unmodifiableList(new ArrayList<>(someList)) which can just be List.copyOf(someList) with Java 9+.

kashike avatar Oct 24 '21 08:10 kashike