Mojang / DataFixerUpper

A set of utilities designed for incremental building, merging and optimization of data transformations.
MIT License
1.2k stars 138 forks source link

Rename Codec.withDefault methods that accept a Supplier #51

Closed kashike closed 4 years ago

kashike commented 4 years ago

Rename Codec.withDefault methods that accept a Supplier to Codec.withDefaultFrom to avoid a method conflict when implementing a Codec<Supplier<T>>.

Without this change, a Codec<Supplier<T>> results in withDefault(Supplier<T>) and withDefault(Supplier<? extends Supplier<T>>).

liach commented 4 years ago

Hmm, you can just add a cast before the lambda to fix type inference, I think?

liach commented 4 years ago

Superseded by #52