Browse Source

DATAMONGO-1421 - Polishing.

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

Original pull request: #448.
pull/410/merge
Mark Paluch 9 years ago
parent
commit
5e77a08b30
  1. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java

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

Loading…
Cancel
Save