Skip to content

Commit 5d4c2c4

Browse files
committed
Fix error message in the ConventionAnnotation
JAVA-2687
1 parent d9e6a3a commit 5d4c2c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bson/src/main/org/bson/codecs/pojo/ConventionAnnotationImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ private <T> void processCreatorAnnotation(final ClassModelBuilder<T> classModelB
143143
List<Type> parameterGenericTypes = creatorExecutable.getParameterGenericTypes();
144144

145145
if (properties.size() != parameterTypes.size()) {
146-
throw creatorExecutable.getError(clazz, "All parameters must be annotated with a @BsonProperty in %s");
146+
throw creatorExecutable.getError(clazz, "All parameters in the @BsonCreator method / constructor must be annotated "
147+
+ "with a @BsonProperty.");
147148
}
148149
for (int i = 0; i < properties.size(); i++) {
149150
boolean isIdProperty = creatorExecutable.getIdPropertyIndex() != null && creatorExecutable.getIdPropertyIndex().equals(i);

0 commit comments

Comments
 (0)