fixed typo in ConstructingObjectParse (#27129)
This commit is contained in:
parent
dda5d1af29
commit
35a2cc1003
|
@ -453,7 +453,7 @@ public final class ConstructingObjectParser<Value, Context> extends AbstractObje
|
|||
* use of ConstructingObjectParser. You should be using ObjectParser instead. Since this is more of a programmer error and the
|
||||
* parser ought to still work we just assert this.
|
||||
*/
|
||||
assert false == constructorArgInfos.isEmpty() : "[" + objectParser.getName() + "] must configure at least on constructor "
|
||||
assert false == constructorArgInfos.isEmpty() : "[" + objectParser.getName() + "] must configure at least one constructor "
|
||||
+ "argument. If it doesn't have any it should use ObjectParser instead of ConstructingObjectParser. This is a bug "
|
||||
+ "in the parser declaration.";
|
||||
// All missing constructor arguments were optional. Just build the target and return it.
|
||||
|
|
|
@ -224,7 +224,7 @@ public class ConstructingObjectParserTests extends ESTestCase {
|
|||
parser.apply(createParser(JsonXContent.jsonXContent, "{}"), null);
|
||||
fail("Expected AssertionError");
|
||||
} catch (AssertionError e) {
|
||||
assertEquals("[constructor_args_required] must configure at least on constructor argument. If it doesn't have any it should "
|
||||
assertEquals("[constructor_args_required] must configure at least one constructor argument. If it doesn't have any it should "
|
||||
+ "use ObjectParser instead of ConstructingObjectParser. This is a bug in the parser declaration.", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue