OpenSearch/buildSrc
Nik Everett 93ab4cfc99 Stop using PROTOTYPE in NamedWriteableRegistry
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
2016-03-24 11:26:44 -04:00
..
src/main Stop using PROTOTYPE in NamedWriteableRegistry 2016-03-24 11:26:44 -04:00
build.gradle Revert "Build: Switch to maven-publish plugin" 2016-03-18 17:22:25 -07:00
version.properties Version: Set version to 5.0.0-alpha1 2016-03-24 08:36:08 +01:00