Skip to content

Commit 6a9528e

Browse files
olcbeandakrone
authored andcommitted
fixed typo in ConstructingObjectParse (#27129)
1 parent 26f83c2 commit 6a9528e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/java/org/elasticsearch/common/xcontent/ConstructingObjectParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ private Value finish() {
453453
* use of ConstructingObjectParser. You should be using ObjectParser instead. Since this is more of a programmer error and the
454454
* parser ought to still work we just assert this.
455455
*/
456-
assert false == constructorArgInfos.isEmpty() : "[" + objectParser.getName() + "] must configure at least on constructor "
456+
assert false == constructorArgInfos.isEmpty() : "[" + objectParser.getName() + "] must configure at least one constructor "
457457
+ "argument. If it doesn't have any it should use ObjectParser instead of ConstructingObjectParser. This is a bug "
458458
+ "in the parser declaration.";
459459
// All missing constructor arguments were optional. Just build the target and return it.

core/src/test/java/org/elasticsearch/common/xcontent/ConstructingObjectParserTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class NoConstructorArgs {
224224
parser.apply(createParser(JsonXContent.jsonXContent, "{}"), null);
225225
fail("Expected AssertionError");
226226
} catch (AssertionError e) {
227-
assertEquals("[constructor_args_required] must configure at least on constructor argument. If it doesn't have any it should "
227+
assertEquals("[constructor_args_required] must configure at least one constructor argument. If it doesn't have any it should "
228228
+ "use ObjectParser instead of ConstructingObjectParser. This is a bug in the parser declaration.", e.getMessage());
229229
}
230230
}

0 commit comments

Comments
 (0)