CORE: Disable Setting Type Validation (#33660) (#33669)

* Reverts setting type validation introduced in #33503
This commit is contained in:
Armin Braun 2018-09-13 20:45:48 +02:00 committed by GitHub
parent e4eb631b8e
commit 040695b64e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -458,7 +458,7 @@ public class Setting<T> implements ToXContentObject {
* @return the raw string representation of the setting value * @return the raw string representation of the setting value
*/ */
String innerGetRaw(final Settings settings) { String innerGetRaw(final Settings settings) {
return settings.get(getKey(), defaultValue.apply(settings), isListSetting()); return settings.get(getKey(), defaultValue.apply(settings));
} }
/** Logs a deprecation warning if the setting is deprecated and used. */ /** Logs a deprecation warning if the setting is deprecated and used. */

View File

@ -180,6 +180,7 @@ public class SettingTests extends ESTestCase {
} }
} }
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/33135")
public void testValidateStringSetting() { public void testValidateStringSetting() {
Settings settings = Settings.builder().putList("foo.bar", Arrays.asList("bla-a", "bla-b")).build(); Settings settings = Settings.builder().putList("foo.bar", Arrays.asList("bla-a", "bla-b")).build();
Setting<String> stringSetting = Setting.simpleString("foo.bar", Property.NodeScope); Setting<String> stringSetting = Setting.simpleString("foo.bar", Property.NodeScope);