Skip to content

Commit ba560ff

Browse files
Thomas Darimontodrotbohm
Thomas Darimont
authored andcommitted
DATAMONGO-1180 - Fixed incorrect exception message creation in PartTreeMongoQuery.
The JSONParseException caught in PartTreeMongoQuery is now passed to the IllegalStateException we throw from the method. Previously it was passed to the String.format(…) varargs. Verified by manually throwing a JSONParseException in the debugger. Original pull request: spring-projects#280. Related pull request: spring-projects#259.
1 parent 50ca32c commit ba560ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/PartTreeMongoQuery.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ protected Query createQuery(ConvertingParameterAccessor accessor) {
9797
return result;
9898

9999
} catch (JSONParseException o_O) {
100-
throw new IllegalStateException(String.format("Invalid query or field specification in %s!", getQueryMethod(),
101-
o_O));
100+
throw new IllegalStateException(String.format("Invalid query or field specification in %s!", getQueryMethod()),
101+
o_O);
102102
}
103103
}
104104

0 commit comments

Comments
 (0)