Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-47

Case-Insenstive Regular Expression causes "EOO Before end of object"

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 1.0
    • Affects Version/s: 0.11
    • Component/s: 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.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            nschmuck Niko Schmuck
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: