Commit 07f128f
committed
[FEAT] Restore factory method and optimize record implementation
- Added the static factory method `of(String username, String password)` to maintain compatibility with existing Selenium code that relies on it.
- Optimized the constructor by using a compact form, ensuring `username` and `password` are non-null without explicitly redefining fields.
- Removed redundant `username()` and `password()` methods, as they are automatically generated by the `record` structure.
- Improved code clarity, maintainability, and adherence to Java's record best practices.1 parent 6cccaa0 commit 07f128f
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
0 commit comments