Skip to content

Commit 4d24742

Browse files
Thomas Darimontodrotbohm
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 4af8761 commit 4d24742

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
@@ -86,8 +86,8 @@ protected Query createQuery(ConvertingParameterAccessor accessor) {
8686
return result;
8787

8888
} catch (JSONParseException o_O) {
89-
throw new IllegalStateException(String.format("Invalid query or field specification in %s!", getQueryMethod(),
90-
o_O));
89+
throw new IllegalStateException(String.format("Invalid query or field specification in %s!", getQueryMethod()),
90+
o_O);
9191
}
9292
}
9393

0 commit comments

Comments
 (0)