Validate blank field name
Validate only 5.0 alpha 6+ index only Closes #19251
This commit is contained in:
parent
450f47d5b5
commit
0ad231546d
|
@ -246,7 +246,7 @@ public abstract class FieldMapper extends Mapper implements Cloneable {
|
|||
super(simpleName);
|
||||
assert indexSettings != null;
|
||||
this.indexCreatedVersion = Version.indexCreated(indexSettings);
|
||||
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_alpha5)) {
|
||||
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_alpha6)) {
|
||||
if (simpleName.isEmpty()) {
|
||||
throw new IllegalArgumentException("name cannot be empty string");
|
||||
}
|
||||
|
|
|
@ -325,7 +325,7 @@ public class ObjectMapper extends Mapper implements Cloneable {
|
|||
super(name);
|
||||
assert settings != null;
|
||||
Version indexCreatedVersion = Version.indexCreated(settings);
|
||||
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_alpha5)) {
|
||||
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_alpha6)) {
|
||||
if (name.isEmpty()) {
|
||||
throw new IllegalArgumentException("name cannot be empty string");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue