- 
    Type:
Bug
 - 
    Resolution: Duplicate
 - 
    Priority:
Major - P3
 - 
    Affects Version/s: 0.11
 - 
    Component/s: None
 - 
    None
 
- 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
DBObject ref = new BasicDBObject();
ref.put("myfield", Pattern.compile(".myValue." , Pattern.CASE_INSENSITIVE));
DBCursor cur = coll.find(ref);
produces the following exception:
java.lang.RuntimeException: db error [EOO Before end of object]
	at com.mongodb.DBApiLayer$MyCollection.find(DBApiLayer.java:324)
	at com.mongodb.DBCursor._check(DBCursor.java:237)
	at com.mongodb.DBCursor._hasNext(DBCursor.java:367)
	at com.mongodb.DBCursor.hasNext(DBCursor.java:392)
	...
when leaving out the case insensitive parameter on pattern construction the query works fine.