Browse Source

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: #280.
Related pull request: #259.
1.6.x
Thomas Darimont 11 years ago committed by Oliver Gierke
parent
commit
a7b70d68d7
  1. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/PartTreeMongoQuery.java

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

@ -97,8 +97,8 @@ public class PartTreeMongoQuery extends AbstractMongoQuery { @@ -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);
}
}

Loading…
Cancel
Save