-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
14034: Eliminate assumption of mutable list argument in SeleniumManager.getBinaryPaths() #14036
Conversation
PR Review 🔍
|
PR Code Suggestions ✨
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @sbabcoc!
…er.getBinaryPaths() (SeleniumHQ#14036) 14034: Eliminate assumption of mutable list argument Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
In the existing implementation, the
getBinaryPaths(List<String>
method assumes that the list supplied by the client is mutable, attempting to append its own items. If an immutable list is supplied, the method triggers UnsupportedOperationException.Motivation and Context
Fixes #14034
Types of changes
Checklist
PR Type
Bug fix
Description
getBinaryPaths
method where it assumed the input list was mutable, causing anUnsupportedOperationException
when an immutable list was provided.ArrayList
to handle command line arguments, ensuring the original list remains unchanged.Changes walkthrough 📝
SeleniumManager.java
Fix immutable list issue in `getBinaryPaths` method
java/src/org/openqa/selenium/manager/SeleniumManager.java
ArrayList
to handle arguments.getBinaryPaths
method to avoid modifying the input list.