-
-
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
[Java] Java language level aids #13834
[Java] Java language level aids #13834
Conversation
PR Description updated to latest commit (0f122f8)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
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.
Can you please run the format script?
./scripts/format.sh
…Handler.java format
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, @iampopovich!
* Improvements from Java 11 API have been incorporated into the code. * removed unnecessary values boxing * remove unnecessary values unboxing * fix for file java/test/org/openqa/selenium/environment/webserver/Utf8Handler.java format * Format script --------- Co-authored-by: Diego Molina <diemol@users.noreply.github.com> Co-authored-by: Diego Molina <diemol@gmail.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
Introduced changes to reduce boilerplate code in control structures and removed redundant method calls for boxing and unboxing data types.
Motivation and Context
These are minor changes aimed at making the code cleaner and reducing the overall number of warnings from IDE code inspections.
Types of changes
Checklist
I've ran CI-Java in forked repo
I've also run gitpod project build with bazel before opening the PR
Type
enhancement
Description
Files.readString
for better readability and efficiency.String.repeat
method to simplify string repetition logic.Changes walkthrough
ExecutingJavascriptTest.java
Simplify File Reading with Files.readString
java/test/org/openqa/selenium/ExecutingJavascriptTest.java
new String(Files.readAllBytes(jqueryFile), US_ASCII)
withFiles.readString(jqueryFile, US_ASCII)
for reading files into astring.
ProxyTest.java
Remove Unnecessary Boxing in Proxy Tests
java/test/org/openqa/selenium/ProxyTest.java
Utf8Handler.java
Update File Reading to Use Files.readString
java/test/org/openqa/selenium/environment/webserver/Utf8Handler.java
Files.readString
for efficiency andsimplicity.
AddingNodesTest.java
Optimize Assertions by Removing Unnecessary Boxing
java/test/org/openqa/selenium/grid/distributor/AddingNodesTest.java
JsonOutputTest.java
Simplify Assertions in JsonOutputTest
java/test/org/openqa/selenium/json/JsonOutputTest.java
JsonTest.java
Enhance JSON Parsing Tests with Simplified Assertions
java/test/org/openqa/selenium/json/JsonTest.java
performance.
DesiredCapabilitiesTest.java
Simplify String Repetition in DesiredCapabilitiesTest
java/test/org/openqa/selenium/remote/DesiredCapabilitiesTest.java
W3CHttpResponseCodecTest.java
Update Error Handling Tests with Primitive Assertions
java/test/org/openqa/selenium/remote/codec/w3c/W3CHttpResponseCodecTest.java