[java] Consistent UTF-8 Encoding and Code Enhancements#14218
[java] Consistent UTF-8 Encoding and Code Enhancements#14218diemol merged 6 commits intoSeleniumHQ:trunkfrom
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
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
Motivation and Context
These changes improve code readability, maintainability, and performance.
Types of changes
Checklist
PR Type
Enhancement, Bug fix
Description
UnsupportedEncodingExceptionhandling withStandardCharsets.UTF_8.LocalDistributorusingOptional.map.DockerOptions.noErrorNoCrytest.Changes walkthrough 📝
8 files
LocalDistributor.java
Simplified node retrieval logic with Optional.mapjava/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java
Optional.map.DockerOptions.java
Replaced traditional for loop with enhanced for-each loopjava/src/org/openqa/selenium/grid/node/docker/DockerOptions.java
Urls.java
Use StandardCharsets.UTF_8 for URL encodingjava/src/org/openqa/selenium/net/Urls.java
UnsupportedEncodingExceptionhandling withStandardCharsets.UTF_8.FormEncodedData.java
Use StandardCharsets.UTF_8 for URL decodingjava/src/org/openqa/selenium/remote/http/FormEncodedData.java
StandardCharsets.UTF_8in URL decoding.ReferrerTest.java
Simplified URL encoding in testsjava/test/org/openqa/selenium/ReferrerTest.java
UnsupportedEncodingExceptionhandling.
ListImagesTest.java
Use StandardCharsets.UTF_8 for URL decoding in testsjava/test/org/openqa/selenium/docker/v1_41/ListImagesTest.java
UnsupportedEncodingExceptionhandling withStandardCharsets.UTF_8.MainTest.java
Simplified PrintStream creation in testsjava/test/org/openqa/selenium/grid/MainTest.java
PrintStreamcreation by removingUnsupportedEncodingExceptionhandling.FormEncodedDataTest.java
Simplified URL encoding in testsjava/test/org/openqa/selenium/remote/http/FormEncodedDataTest.java
UnsupportedEncodingExceptionhandling.
1 files
W3CHttpResponseCodecTest.java
Removed unnecessary unboxing in test assertionsjava/test/org/openqa/selenium/remote/codec/w3c/W3CHttpResponseCodecTest.java