-
Notifications
You must be signed in to change notification settings - Fork 165
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
(#1212) Fixed SetOf, which discarded all elements after duplicated occurrence #1215
Conversation
Job #1215 is now in scope, role is |
Codecov Report
@@ Coverage Diff @@
## master #1215 +/- ##
============================================
+ Coverage 89.22% 89.37% +0.14%
- Complexity 1660 1671 +11
============================================
Files 279 280 +1
Lines 3992 4008 +16
Branches 213 213
============================================
+ Hits 3562 3582 +20
+ Misses 396 392 -4
Partials 34 34
Continue to review full report at Codecov.
|
This pull request #1215 is assigned to @fabriciofx/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @paulodamaso/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be no monetary reward for this job |
@@ -60,7 +61,7 @@ public SetOf(final T... array) { | |||
public SetOf(final Iterable<T> src) { | |||
super(() -> { | |||
final Set<T> tmp = new HashSet<>(); | |||
new And(tmp::add, src) | |||
new And((Proc<T>) tmp::add, src) |
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.
@fanifieiev I think it would be way better to use src.forEach(tmp::add)
, that's what Iterable
is made for.
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.
@victornoel Sure, that one looks better. But just wondering what was the And(final Proc<X> proc, final Iterable<X> src)
created for ?
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.
@fanifieiev I think it is here only for completeness. And
is more about the logical assertion (which does not rely on side effect as the Proc
version does).
I created #1226 in reaction to this discussion :)
@0crat status |
@fanifieiev This is what I know about this job in C63314D6Z, as in §32:
|
@0crat wait for REV |
@fanifieiev @fanifieiev/z you can't register impediment for this job |
@0crat status |
@fanifieiev This is what I know about this job in C63314D6Z, as in §32:
|
@paulodamaso This PR review is taking really long. |
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.
@fanifieiev please, take a look.
"Can't behave as a set", | ||
public void behaveAsSetWithOriginalDuplicationsInTheTail() { | ||
new Assertion<>( | ||
"Must keep unique numbers", |
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.
@fanifieiev please, change "Must keep unique numbers
" to "Must keep unique integer numbers"
.
@Test | ||
public void behaveAsSetWithOriginalDuplicationsInTheHead() { | ||
new Assertion<>( | ||
"Must keep unique numbers", |
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.
@fanifieiev please, change "Must keep unique numbers
" to "Must keep unique integer numbers"
.
@Test | ||
public void behaveAsSetWithOriginalDuplicationsInTheMiddle() { | ||
new Assertion<>( | ||
"Must keep unique numbers", |
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.
@fanifieiev please, change "Must keep unique numbers
" to "Must keep unique integer numbers"
.
} | ||
|
||
@Test | ||
public void behaveAsSetWithOriginalMergedCollectionsWithDuplicates() { |
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.
@fanifieiev please, add more tests for:
- chars
- double numbers
- other type object different of primitives/boxed and string.
@fabriciofx The review issues have been resolved. Please review. |
@fanifieiev seems fine to me. @paulodamaso can you merge it, please? |
@paulodamaso Can you please merge it? Please see |
@paulodamaso ping |
@rultor merge |
@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here |
@paulodamaso Done! FYI, the full log is here (took me 13min) |
@sereshqua/z please review this job completed by @fabriciofx/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed |
Code review was too long (17 days), architects (@paulodamaso) were penalized, see §55 |
The job #1215 is now out of scope |
Payment to |
@fabriciofx please make sure next CR your comments would be mostly about design problems, not just the cosmetic issues |
@sereshqua ok. Thanks! |
@0crat quality acceptable |
Quality review completed: +4 point(s) just awarded to @sereshqua/z |
Order was finished, quality is "acceptable": +15 point(s) just awarded to @fabriciofx/z |
This pull request is for issue 1212
org.cactoos.set.SetOf
was causing an issue when the original collection/array contained duplicate values, which resulted the cut off of the collection just right after first duplicated value.