93ab4cfc99
readFrom is confusing because it requires an instance of the type that it is reading but it doesn't modify it. But we also have (deprecated) methods named readFrom that *do* modify the instance. The "right" way to implement the non-modifying readFrom is to delegate to a constructor that takes a StreamInput so that the read object can be immutable. Now that we have `@FunctionalInterface`s it is fairly easy to register things by referring directly to the constructor. This change modifying NamedWriteableRegistry so that it does that. It keeps supporting `registerPrototype` which registers objects to be read by readFrom but deprecates it and delegates it to a new `register` method that allows passing a simple functional interface. It also cuts Task.Status subclasses over to using that method. The start of #17085 |
||
---|---|---|
.. | ||
ingest-grok | ||
lang-expression | ||
lang-groovy | ||
lang-mustache | ||
lang-painless | ||
reindex | ||
build.gradle |