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:
parent
eab3113204
commit
de6b4f35b1
|
@ -122,7 +122,7 @@ public class Setting<T> extends ToXContentToBytes {
|
|||
this.defaultValue = defaultValue;
|
||||
this.parser = parser;
|
||||
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) {
|
||||
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 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.
|
||||
|
@ -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 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.
|
||||
|
|
|
@ -475,7 +475,7 @@ public class SettingTests extends ESTestCase {
|
|||
Setting.simpleString("foo.bar", (Property[]) null);
|
||||
fail();
|
||||
} catch (IllegalArgumentException ex) {
|
||||
assertThat(ex.getMessage(), containsString("properties can not be null for setting"));
|
||||
assertThat(ex.getMessage(), containsString("properties cannot be null for setting"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue