From a7b70d68d7cad60dfbe7ab3ade88ab563286956e Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Tue, 10 Mar 2015 10:02:18 +0100 Subject: [PATCH] DATAMONGO-1180 - Fixed incorrect exception message creation in PartTreeMongoQuery. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: #280. Related pull request: #259. --- .../data/mongodb/repository/query/PartTreeMongoQuery.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/PartTreeMongoQuery.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/PartTreeMongoQuery.java index b52510939..b97d01922 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/PartTreeMongoQuery.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/PartTreeMongoQuery.java @@ -97,8 +97,8 @@ public class PartTreeMongoQuery extends AbstractMongoQuery { return result; } catch (JSONParseException o_O) { - throw new IllegalStateException(String.format("Invalid query or field specification in %s!", getQueryMethod(), - o_O)); + throw new IllegalStateException(String.format("Invalid query or field specification in %s!", getQueryMethod()), + o_O); } }