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.
This commit is contained in:
Thomas Darimont
2015-03-10 10:02:18 +01:00
committed by Oliver Gierke
parent 4af876152c
commit 4d24742181

View File

@@ -86,8 +86,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);
}
}