Make Settings.Builder.remove() fluent#145294
Conversation
Settings.Builder.remove() currently returns the previously set value of the key being removed. The vast majority of the callsites of this method ignore the return value, and would in fact benefit from it instead returning the Builder instance itself. This changes remove() to return the Builder to allow fluent chaining of calls, and adds a new removeAndGet() method for the handful of callsites that do use the returned value.
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis change refactors the ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
mark-vieira
left a comment
There was a problem hiding this comment.
This makes a lot more sense. Thanks @romseygeek.
…rics
* upstream/main: (21 commits)
Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:external-basic.topSnippetsFunction} elastic#145353
Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:external-basic.scoreFunction} elastic#145352
[DiskBBQ] Fix bug in NeighborQueue#popRawAndAddRaw (elastic#145324)
Fix dense_vector default index options when using BFLOAT16 (elastic#145202)
Use checked exceptions in entitlement constructor rules (elastic#145234)
ESQL: DS: datasource file plugins should not return TEXT types (elastic#145334)
Plumb DLM error store through to DlmFrozenTransition classes (elastic#145243)
Make Settings.Builder.remove() fluent (elastic#145294)
Add FLS tests for METRICS_INFO and TS_INFO (elastic#145211)
Fix flaky SecurityFeatureResetTests (elastic#145063)
[DOCS] Fix conflict markers in ESQL processing command list (elastic#145338)
Skip certain metric assertions on Windows (elastic#144933)
[ES|QL] Add schema reconciliation for multi-file external sources (elastic#145220)
Simplify DiskBBQ dynamic visit ratio to linear (elastic#142784)
ESQL: Disallow unmapped_fields=load with partial non-KEYWORD (elastic#144109)
[Transform] Track Linked Projects (elastic#144399)
Fix bulk scoring to process last batch instead of falling through to scalar tail (elastic#145316)
Clean up TickerScheduleEngineTests (elastic#145303)
[CI] ShardBulkInferenceActionFilterIT testRestart - Ensuring that secrets-inference index is available after full restart and unmuting test (elastic#145317)
Add CRUD doc to the DistributedArchitectureGuide (elastic#144710)
...
Settings.Builder.remove() currently returns the previously set value of the key being removed. The vast majority of the callsites of this method ignore the return value, and would in fact benefit from it instead returning the Builder instance itself. This changes remove() to return the Builder to allow fluent chaining of calls, and adds a new removeAndGet() method for the handful of callsites that do use the returned value.
Settings.Builder.remove() currently returns the previously set value of the key being removed. The vast majority of the callsites of this method ignore the return value, and would in fact benefit from it instead returning the Builder instance itself. This changes remove() to return the Builder to allow fluent chaining of calls, and adds a new removeAndGet() method for the handful of callsites that do use the returned value.
Settings.Builder.remove() currently returns the previously set value of the key being removed. The vast majority of the callsites of this method ignore the return value, and would in fact benefit from it instead returning the Builder instance itself. This changes remove() to return the Builder to allow fluent chaining of calls, and adds a new removeAndGet() method for the handful of callsites that do use the returned value.
Settings.Builder.remove() currently returns the previously set value of the key being removed. The vast majority of the callsites of this method ignore the return value, and would in fact benefit from it instead returning the Builder instance itself. This changes remove() to return the Builder to allow fluent chaining of calls, and adds a new removeAndGet() method for the handful of callsites that do use the returned value.
Settings.Builder.remove() currently returns the previously set value of the key being removed. The vast majority of the callsites of this method ignore the return value, and would in fact benefit from it instead returning the Builder instance itself. This changes remove() to return the Builder to allow fluent chaining of calls, and adds a new removeAndGet() method for the handful of callsites that do use the returned value.