DATAMONGO-1605 - Polishing.
Remove additional quoting around JSON serialization because JSON serialization adds quotes to a string. Reformat code.
This commit is contained in:
@@ -219,10 +219,6 @@ class ExpressionEvaluatingParameterBinder {
|
||||
return base64representation;
|
||||
}
|
||||
|
||||
if (binding.isExpression() && value instanceof String) {
|
||||
return "\"" + JSON.serialize(value) + "\"";
|
||||
}
|
||||
|
||||
return JSON.serialize(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -519,7 +519,7 @@ public class StringBasedMongoQueryUnitTests {
|
||||
public void findUsingSpelShouldRetainNullValues() throws Exception {
|
||||
|
||||
StringBasedMongoQuery mongoQuery = createQueryForMethod("findByUsingSpel", Object.class);
|
||||
ConvertingParameterAccessor accessor = StubParameterAccessor.getAccessor(converter, new Object[]{null});
|
||||
ConvertingParameterAccessor accessor = StubParameterAccessor.getAccessor(converter, new Object[] { null });
|
||||
|
||||
org.springframework.data.mongodb.core.query.Query query = mongoQuery.createQuery(accessor);
|
||||
assertThat(query.getQueryObject(), is(new Document("arg0", null)));
|
||||
|
||||
Reference in New Issue
Block a user