Skip to content
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

IteratorOfLongs and IteratorOfShorts #854

Merged
merged 5 commits into from
May 15, 2018
Merged

Conversation

victornoel
Copy link
Collaborator

This is for #838.

This:

  • adds IteratorOfLongs and IteratorOfShorts
  • uses them in IterableOfLongs and IterableOfShorts
  • remove some unneeded annotations in other IteratorOfXXX (because it was so easy to do so and blatantly incorrect)
  • improve documentation for all IteratorOfXXX (because I spent some time trying to understand something simple: that their role was to convert from primitive to objects)
  • applied the conclusion we arrived to with @krzyk in #802 created iterator of floats and ints #832 (comment) about the simplest way to delegate to IteratorOfXXX in IterableOfXXX

I realise this is a bit more than the job asked, but all the other changes I made, I had to make them for the code I was introducing anyway.

@0crat 0crat added the scope label May 10, 2018
@0crat
Copy link
Collaborator

0crat commented May 10, 2018

Job #854 is now in scope, role is REV

@0crat
Copy link
Collaborator

0crat commented May 10, 2018

This pull request #854 is assigned to @Vatavuk/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @llorllale/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

@Vatavuk
Copy link
Contributor

Vatavuk commented May 11, 2018

@victornoel build is not passing, there are some formatting errors

@codecov-io
Copy link

codecov-io commented May 12, 2018

Codecov Report

Merging #854 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #854      +/-   ##
============================================
+ Coverage     85.53%   85.55%   +0.02%     
- Complexity     1392     1396       +4     
============================================
  Files           251      253       +2     
  Lines          3698     3704       +6     
  Branches        211      209       -2     
============================================
+ Hits           3163     3169       +6     
  Misses          487      487              
  Partials         48       48
Impacted Files Coverage Δ Complexity Δ
.../java/org/cactoos/iterator/IteratorOfBooleans.java 100% <ø> (ø) 5 <0> (ø) ⬇️
src/main/java/org/cactoos/iterator/IteratorOf.java 100% <ø> (ø) 5 <0> (ø) ⬇️
...main/java/org/cactoos/iterator/IteratorOfInts.java 100% <ø> (ø) 5 <0> (ø) ⬇️
...in/java/org/cactoos/iterator/IteratorOfFloats.java 100% <ø> (ø) 5 <0> (ø) ⬇️
...ain/java/org/cactoos/iterator/IteratorOfChars.java 100% <ø> (ø) 5 <0> (ø) ⬇️
...n/java/org/cactoos/iterable/IterableOfDoubles.java 100% <ø> (ø) 3 <0> (ø) ⬇️
...ain/java/org/cactoos/iterable/IterableOfLongs.java 100% <100%> (ø) 1 <1> (-2) ⬇️
.../java/org/cactoos/iterable/IterableOfBooleans.java 100% <100%> (ø) 1 <1> (ø) ⬇️
...in/java/org/cactoos/iterable/IterableOfShorts.java 100% <100%> (ø) 1 <1> (-2) ⬇️
...in/java/org/cactoos/iterator/IteratorOfShorts.java 100% <100%> (ø) 5 <5> (?)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80ed872...0564dd8. Read the comment docs.

@victornoel
Copy link
Collaborator Author

@Vatavuk sorry about that, it seems this week is not my week ;)
I fixed the problems and also rebased to comply with the latest requirements of qulice which was recently updated.
Thanks (again) for the heads-up!

Copy link
Contributor

@Vatavuk Vatavuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel Good job! just two comments and we can merge

this.iteratorWithFetchedElements().next();
}

private IteratorOfLongs iteratorWithFetchedElements() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel this should be static method, but better approach would be to remove it completely and move its implementation back to tests using different iterator size in each test. This would remove dependency between tests and provide more test diversity.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I also did the same for the other IteratorOfXXX tests (actually some of them were already as you propose).

this.iteratorWithFetchedElements().next();
}

private IteratorOfShorts iteratorWithFetchedElements() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel same comment as for IteratorOfLongsTest

@victornoel victornoel force-pushed the 838 branch 2 times, most recently from 9cf061c to 6caaae6 Compare May 12, 2018 21:10
@victornoel
Copy link
Collaborator Author

@Vatavuk it is fixed now and rebased on master

Copy link
Contributor

@Vatavuk Vatavuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vatavuk
Copy link
Contributor

Vatavuk commented May 12, 2018

@llorllale good to merge

@victornoel
Copy link
Collaborator Author

@llorllale I think this should be merged

*
* <p>There is no thread-safety guarantee.</p>
*
* @since 0.32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel should be 0.34 now

*
* <p>There is no thread-safety guarantee.</p>
*
* @since 0.32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel should be 0.34 now

/**
* Tests for {@link IteratorOfLongs}.
*
* @since 0.32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel 0.34 now

/**
* Tests for {@link IteratorOfShorts}.
*
* @since 0.32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel 0.34 now

@llorllale
Copy link
Contributor

@victornoel there are a lot of irrelevant changes in this PR. Although they're small, they're introducing too much noise. Let's keep PRs tightly focused in the future please

@llorllale
Copy link
Contributor

@victornoel also see my comments regarding @since above

@victornoel
Copy link
Collaborator Author

@llorllale duly noted for the extra changes, next time I will open issues.

The @since tags should be correct now, thanks

@llorllale
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented May 15, 2018

@rultor merge

@llorllale OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 0564dd8 into yegor256:master May 15, 2018
@rultor
Copy link
Collaborator

rultor commented May 15, 2018

@rultor merge

@llorllale Done! FYI, the full log is here (took me 9min)

@0crat
Copy link
Collaborator

0crat commented May 15, 2018

@elenavolokhova/z please review this job completed by @Vatavuk/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat 0crat removed the scope label May 15, 2018
@0crat
Copy link
Collaborator

0crat commented May 15, 2018

The job #854 is now out of scope

@0crat
Copy link
Collaborator

0crat commented May 15, 2018

Payment to ARC for a closed pull request, as in §28: +10 point(s) just awarded to @llorllale/z

@victornoel victornoel deleted the 838 branch May 15, 2018 20:01
@elenavolokhova
Copy link

@0crat quality good

@0crat
Copy link
Collaborator

0crat commented May 16, 2018

Order was finished, quality is "good": +20 point(s) just awarded to @Vatavuk/z

@0crat
Copy link
Collaborator

0crat commented May 16, 2018

Quality review completed: +8 point(s) just awarded to @elenavolokhova/z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants