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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • 1.0
    • 0.11
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: