Remove inaccurate Javadoc on Setting constructor

The 'Setting' constructor has some outdated Javadoc that suggested that it would automatically apply 'Property.NodeScope' if no scope is supplied, but no scope is added in that case.
This commit is contained in:
Chris Earle 2016-05-23 19:46:31 -04:00
parent eab3113204
commit de6b4f35b1
2 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ public class Setting<T> extends ToXContentToBytes {
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
this.parser = parser; this.parser = parser;
if (properties == null) { if (properties == null) {
throw new IllegalArgumentException("properties can not be null for setting [" + key + "]"); throw new IllegalArgumentException("properties cannot be null for setting [" + key + "]");
} }
if (properties.length == 0) { if (properties.length == 0) {
this.properties = EMPTY_PROPERTIES; this.properties = EMPTY_PROPERTIES;
@ -132,7 +132,7 @@ public class Setting<T> extends ToXContentToBytes {
} }
/** /**
* Creates a new Setting instance. When no scope is provided, we default to {@link Property#NodeScope}. * Creates a new Setting instance
* @param key the settings key for this setting. * @param key the settings key for this setting.
* @param defaultValue a default value function that returns the default values string representation. * @param defaultValue a default value function that returns the default values string representation.
* @param parser a parser that parses the string rep into a complex datatype. * @param parser a parser that parses the string rep into a complex datatype.
@ -165,7 +165,7 @@ public class Setting<T> extends ToXContentToBytes {
} }
/** /**
* Creates a new Setting instance. When no scope is provided, we default to {@link Property#NodeScope}. * Creates a new Setting instance
* @param key the settings key for this setting. * @param key the settings key for this setting.
* @param fallbackSetting a setting who's value to fallback on if this setting is not defined * @param fallbackSetting a setting who's value to fallback on if this setting is not defined
* @param parser a parser that parses the string rep into a complex datatype. * @param parser a parser that parses the string rep into a complex datatype.

View File

@ -475,7 +475,7 @@ public class SettingTests extends ESTestCase {
Setting.simpleString("foo.bar", (Property[]) null); Setting.simpleString("foo.bar", (Property[]) null);
fail(); fail();
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
assertThat(ex.getMessage(), containsString("properties can not be null for setting")); assertThat(ex.getMessage(), containsString("properties cannot be null for setting"));
} }
} }
} }