Refactor Options as Selection#1885
Conversation
…ove duplicated methods from Selection
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1885 +/- ##
============================================
+ Coverage 92.55% 92.59% +0.04%
- Complexity 3562 3573 +11
============================================
Files 346 347 +1
Lines 7053 7051 -2
Branches 678 675 -3
============================================
+ Hits 6528 6529 +1
Misses 364 364
+ Partials 161 158 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I first renamed |
|
I also chose to deprecate With this much of a change, i did not mark any class or method as |
asolntsev
left a comment
There was a problem hiding this comment.
If we all like the name faker.selection().oneOf(...), then this PR is totally fine.
| * @since 0.8.0 | ||
| * @deprecated Use {@link Selection} instead | ||
| */ | ||
| @Deprecated(since = "3.0.0") |
There was a problem hiding this comment.
Should this have the forRemoval=true flag on it? And possibly on a few other spots as well?
|
I left a tiny comment, not 100% sure about it, but I'd think it would make sense to mark it for removal? |
I'm ok with it. Will do. |
|
Thanks! Looks good to me. Anyone else feedback? |
| @SuppressWarnings("removal") | ||
| @Deprecated(since = "3.0.0", forRemoval = true) | ||
| default Options options() { | ||
| return getProvider(Options.class, Options::new); |
There was a problem hiding this comment.
Instead of suppressing the removal warning why don't we just actually use selection internally?
There was a problem hiding this comment.
Because it will not return the same class (and Selection.class does not extend Options.class).
There was a problem hiding this comment.
Right okay, sorry. Coffee needed 🙄
|
Is there something left for me to do for this PR? |
Address #1883 by creating a whole new Selection class