Factor UnknownNamedObjectException into its own class#28931
Factor UnknownNamedObjectException into its own class#28931dakrone merged 4 commits intoelastic:masterfrom
Conversation
This moves the inner class `UnknownNamedObjectException` from `NamedXContentRegistry` into a top-level class. This is so that `NamedXContentRegistry` doesn't have to depend on StreamInput and StreamOutput. Relates to elastic#28504
|
/cc @elastic/es-core-infra |
jasontedor
left a comment
There was a problem hiding this comment.
I left two comments; no need for another review after addressing.
| UNKNOWN_NAMED_OBJECT_EXCEPTION(org.elasticsearch.common.xcontent.NamedXContentRegistry.UnknownNamedObjectException.class, | ||
| org.elasticsearch.common.xcontent.NamedXContentRegistry.UnknownNamedObjectException::new, 148, Version.V_5_2_0), | ||
| UNKNOWN_NAMED_OBJECT_EXCEPTION(UnknownNamedObjectException.class, | ||
| UnknownNamedObjectException::new, 148, Version.V_5_2_0), |
There was a problem hiding this comment.
Would you make this consistent with the rest of the code and use the fully-qualified name here (instead of adding an import)?
| private final String name; | ||
|
|
||
| public UnknownNamedObjectException(XContentLocation contentLocation, Class<?> categoryClass, | ||
| String name) { |
There was a problem hiding this comment.
This looks like it will fit on the previous line and remain under 140 columns?
nik9000
left a comment
There was a problem hiding this comment.
I'm fine with the move but I don't think this helps much with decoupling. It still extends from ElasticsearchException.
Yeah, it just makes it easier for me to go programatically through each file and separate them |
Fine by me. |
* Factor UnknownNamedObjectException into its own class This moves the inner class `UnknownNamedObjectException` from `NamedXContentRegistry` into a top-level class. This is so that `NamedXContentRegistry` doesn't have to depend on StreamInput and StreamOutput. Relates to #28504
* Factor UnknownNamedObjectException into its own class This moves the inner class `UnknownNamedObjectException` from `NamedXContentRegistry` into a top-level class. This is so that `NamedXContentRegistry` doesn't have to depend on StreamInput and StreamOutput. Relates to elastic#28504
* master: (28 commits) Maybe die before failing engine (elastic#28973) Remove special handling for _all in nodes info Remove Booleans use from XContent and ToXContent (elastic#28768) Update Gradle Testing Docs (elastic#28970) Make primary-replica resync failures less lenient (elastic#28534) Remove temporary file 10_basic.yml~ Use different pipeline id in test. (pipelines do not get removed between tests extending from ESIntegTestCase) Use fixture to test the repository-gcs plugin (elastic#28788) Use String.join() to describe a list of tasks (elastic#28941) Fixed incorrect test try-catch statement Plugins: Consolidate plugin and module loading code (elastic#28815) percolator: Take `matchAllDocs` and `verified` of the sub result into account when analyzing a function_score query. Build: Remove rest tests on archive distribution projects (elastic#28952) Remove FastStringReader in favor of vanilla StringReader (elastic#28944) Remove FastCharArrayReader and FastCharArrayWriter (elastic#28951) Continue registering pipelines after one pipeline parse failure. (elastic#28752) Build: Fix ability to ignore when no tests are run (elastic#28930) [rest-api-spec] update doc link for /_rank_eval Switch XContentBuilder from BytesStreamOutput to ByteArrayOutputStream (elastic#28945) Factor UnknownNamedObjectException into its own class (elastic#28931) ...
This moves the inner class
UnknownNamedObjectExceptionfromNamedXContentRegistryinto a top-level class. This is so thatNamedXContentRegistrydoesn't have to depend on StreamInput and StreamOutput.Relates to #28504