-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Update ModuleGenerator.java #15189
base: trunk
Are you sure you want to change the base?
Update ModuleGenerator.java #15189
Conversation
-Reduction of repetitions in argument and file management. -Use of streams and Collectors to simplify transformations. -Encapsulation of complex tasks into well-defined methods. -Use of try-with-resources for safe resource management.
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
import java.nio.file.Paths; | ||
import java.nio.file.SimpleFileVisitor; | ||
import java.nio.file.StandardCopyOption; | ||
import com.github.javaparser.ast.modules.*; |
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.
Please ensure formatting changes are done as part of a separate PR. Also, I suggest breaking down the PR into smaller changes that are grouped with a single motivation so that it is easy to review. Since this class impacts how CDP classes are generated and I don't think there is an easy way to test if there are any regressions with the changes made in this so we want to ensure no breaking changes go in.
User description
-Reduction of repetitions in argument and file management. -Use of streams and Collectors to simplify transformations. -Encapsulation of complex tasks into well-defined methods. -Use of try-with-resources for safe resource management.
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.
Motivation and Context
Types of changes
Checklist
PR Type
Enhancement
Description
Refactored
ModuleGenerator.java
to reduce code repetition.Simplified argument parsing using
Map.ofEntries
.Encapsulated complex logic into helper methods for clarity.
Improved resource management with try-with-resources.
Changes walkthrough 📝
ModuleGenerator.java
Refactored `ModuleGenerator.java` for clarity and efficiency
java/src/dev/selenium/tools/modules/ModuleGenerator.java
Map.ofEntries
.validateInputs
andprepareJdepsArgs
.modularity.