[JAVA-3817] Filters.regex() Javadocs reference "options" even for overloads without them Created: 17/Aug/20  Updated: 28/Oct/23  Resolved: 01/Sep/20

Status: Closed
Project: Java Driver
Component/s: Documentation
Affects Version/s: 4.1.0
Fix Version/s: 4.2.0

Type: Improvement Priority: Minor - P4
Reporter: Matthew Justin Assignee: Brian DeLeonardis (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible

 Description   

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".



 Comments   
Comment by Githook User [ 01/Sep/20 ]

Author:

{'name': 'Brian DeLeonardis', 'email': 'bdeleonardis1@gmail.com', 'username': 'bdeleonardis1'}

Message: Fix Filters.regex Javadoc

JAVA-3817
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/7eb10ad08102f894e9066546879503710b7817d5

Generated at Thu Feb 08 09:00:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.