[JAVA-3232] Connection string defaults booleans to false instead of null when non-boolean value is specified Created: 18/Mar/19  Updated: 28/Oct/23  Resolved: 18/Apr/19

Status: Closed
Project: Java Driver
Component/s: Configuration
Affects Version/s: None
Fix Version/s: 3.11.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Consider a connection string like mongodb://localhost/?retryWrites=foo.

The ConnectionString will issue a warning, but then set retryWrites to false. I'd expect it to set it (and any other boolean property) to null, so it picks up the default value (which is not always false).



 Comments   
Comment by Githook User [ 18/Apr/19 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin', 'username': 'jyemin'}

Message: Treat unrecognized boolean value in connection string as unset

Change behavior of an unrecognized boolean value in the connection
string to be as if the option was unset.

For legacy compatibility, "true", "yes", and "1" still indicate true,
and "false", "no", and "0" indicate false.

JAVA-3232
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/2841f25f726a4b60aee1c461070943051830c840

Generated at Thu Feb 08 08:59:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.