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

Filters.regex() Javadocs reference "options" even for overloads without them

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.2.0
    • Affects Version/s: 4.1.0
    • Component/s: Documentation
    • Labels:
      None
    • Fully Compatible

      There are three different overloads of com.mongodb.client.model.Filters.regex():

       All three of these overloads have the same Javadoc text:

      Creates a filter that matches all documents where the value of the field matches the given regular expression pattern with the given options applied.

       However, only one of these methods actually takes in options.  The (String, String) variation corresponds to no options, and the (String, Pattern) variation presumably uses the compiled Pattern's match flags.

      I would expect the two overloads that lack an "options" argument to either not mention it, or to specify how it actually affects the options rather than reference nonexistent "given options".

            Assignee:
            brian.deleonardis@mongodb.com Brian DeLeonardis (Inactive)
            Reporter:
            matthew.j.justin@gmail.com Matthew Justin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: