[JAVA-314] Minor typo in exception message Created: 30/Mar/11  Updated: 10/Mar/12  Resolved: 10/Mar/12

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 2.5
Fix Version/s: None

Type: Bug Priority: Trivial - P5
Reporter: Leif Mortenson Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

While testing query failures, I intentionally passed an illegal token "$barf" to an update query. This correctly results in an exception. But note the missing " " between the word "specified" and "$barf".

jvm 1 | com.mongodb.MongoException: Invalid modifier specified$barf
jvm 1 | at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:141)
jvm 1 | at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:162)
jvm 1 | at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:146)
jvm 1 | at com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:335)

Cheers,
Leif



 Comments   
Comment by Antoine Girbal [ 30/Mar/11 ]

this is an issue on server side, driver just reports it as is.
Testing against a recent server in shell, the error is correct:
> db.messages.update({}, {$barf: {a:1}})
Invalid modifier specified $barf

so most likely it's a server bug that got fixed.

Generated at Thu Feb 08 08:51:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.