DATAMONGO-1421 - Polishing.

Remove trailing whitespaces. Construct exception message with String.format(…).

Original pull request: #448.
This commit is contained in:
Mark Paluch
2017-03-08 08:43:51 +01:00
parent c37dfd9688
commit 50fcbd18f2

View File

@@ -94,8 +94,8 @@ public class Query {
this.criteria.put(key, criteriaDefinition);
} else {
throw new InvalidMongoDbApiUsageException(
"Due to limitations of the com.mongodb.BasicDocument, " + "you can't add a second '" + key + "' criteria. "
+ "Query already contains '" + serializeToJsonSafely(existing.getCriteriaObject()) + "'.");
String.format("Due to limitations of the com.mongodb.BasicDocument, you can't add a second '%s' criteria. "
+ "Query already contains '%s'", key, serializeToJsonSafely(existing.getCriteriaObject())));
}
return this;