Skip to content

Conversation

@igraves
Copy link
Member

@igraves igraves commented Mar 14, 2021

This converts jpackage to use Stream.toList() instead of Stream.collect(Collectors.toList()). One piece of code was modified to not mutate a list in addition to one test that used a mutating sort on a list. The rest of the changes are simple substitutions.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Download

To checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/2997/head:pull/2997
$ git checkout pull/2997

To update a local copy of the PR:
$ git checkout pull/2997
$ git pull https://git.openjdk.java.net/jdk pull/2997/head

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 14, 2021

👋 Welcome back igraves! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 14, 2021
@openjdk
Copy link

openjdk bot commented Mar 14, 2021

@igraves The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Mar 14, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 14, 2021

Webrevs

Choose a reason for hiding this comment

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

Why this explicit cast is needed here?

Copy link
Member Author

Choose a reason for hiding this comment

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

The explicit cast is needed because Stream.toList() is invariant, but the stream is producing a covariant type (by way of the type inferencer and Stream.of(..) accepting two subclasses of WixFragmentBuilder). We need to introduce a hint to bring the type back to the invariant form. On second thought I'm going to make this explicit type argument instead so it's clear that the casting isn't part to what the code is otherwise doing.

Choose a reason for hiding this comment

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

I guess this can be simplified down to components.stream().toArray(BigInteger[]::new);

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch!

Copy link
Member

@alexeysemenyukoracle alexeysemenyukoracle left a comment

Choose a reason for hiding this comment

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

Looks good. Minor improvements suggested.

@openjdk
Copy link

openjdk bot commented Mar 15, 2021

@igraves This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8263545: Convert jpackage to use Stream.toList()

Reviewed-by: asemenyuk, almatvee

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 89 new commits pushed to the master branch:

  • b49c589: 8263658: Use the blessed modifier order in java.base
  • 1572f3c: 8263852: Unused method SoftRefPolicy::use_should_clear_all_soft_refs
  • 57497ab: 8263821: Remove unused MethodTypeForm canonicalization codes
  • 4d51a82: 8263818: Release JNI local references in get/set-InetXXAddress-member helper functions of net_util.c
  • 701fd9d: 8262476: Add filter to speed up CompileCommand lookup
  • 454af87: 8263185: Mallinfo deprecated in glibc 2.33
  • d24e4cf: 8263481: Specification of JComponent::setDefaultLocale doesn't mention that passing 'null' restores VM's default locale
  • 1a21f77: 8263482: Make access to the ICC color profiles data multithread-friendly
  • d185655: 8263832: Shenandoah: Fixing parallel thread iteration in final mark task
  • 434a399: 8260274: Cipher.init(int, key) does not use highest priority provider for random bytes
  • ... and 79 more: https://git.openjdk.java.net/jdk/compare/d6b5e1809bbeb31ec87a5a73f0f49de41c6fa0f7...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@alexeysemenyukoracle, @sashamatveev) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 15, 2021
@igraves
Copy link
Member Author

igraves commented Mar 15, 2021

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 15, 2021
@openjdk
Copy link

openjdk bot commented Mar 15, 2021

@igraves
Your change (at version ce11489b1a134f727191a68b71456cfa61a2d231) is now ready to be sponsored by a Committer.

@igraves igraves force-pushed the convert-jpackage-stream-tolist branch from ce11489 to 37d3692 Compare March 16, 2021 04:51
@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Mar 16, 2021
@kevinrushforth
Copy link
Member

@igraves as a "best practice" try to avoid doing a force-push to a branch with an active code review. It makes it hard for reviewers to see what has changed. If you need to merge changes from master, use "git merge master" instead.

@alexeysemenyukoracle @sashamatveev Can you re-review this so Ian can integrate it?

@igraves
Copy link
Member Author

igraves commented Mar 18, 2021

@kevinrushforth Understood, thanks!

@sashamatveev
Copy link
Member

Looks fine.

@igraves
Copy link
Member Author

igraves commented Mar 19, 2021

/integrate

@igraves
Copy link
Member Author

igraves commented Mar 19, 2021

Ready for sponsoring when you all are.

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 19, 2021
@openjdk
Copy link

openjdk bot commented Mar 19, 2021

@igraves
Your change (at version 37d3692) is now ready to be sponsored by a Committer.

@alexeysemenyukoracle
Copy link
Member

/sponsor

@openjdk openjdk bot closed this Mar 19, 2021
@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 19, 2021
@openjdk openjdk bot removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 19, 2021
@openjdk
Copy link

openjdk bot commented Mar 19, 2021

@alexeysemenyukoracle @igraves Since your change was applied there have been 92 commits pushed to the master branch:

  • ed701ea: 8262271: SA: Add new stress test that tests getting the stack trace of an active thread
  • 30da9bc: 8263546: Add "findsym" command to clhsdb.html help file
  • d41f751: 8247370: Clean up unused printing code in awt_PrintJob.cpp
  • b49c589: 8263658: Use the blessed modifier order in java.base
  • 1572f3c: 8263852: Unused method SoftRefPolicy::use_should_clear_all_soft_refs
  • 57497ab: 8263821: Remove unused MethodTypeForm canonicalization codes
  • 4d51a82: 8263818: Release JNI local references in get/set-InetXXAddress-member helper functions of net_util.c
  • 701fd9d: 8262476: Add filter to speed up CompileCommand lookup
  • 454af87: 8263185: Mallinfo deprecated in glibc 2.33
  • d24e4cf: 8263481: Specification of JComponent::setDefaultLocale doesn't mention that passing 'null' restores VM's default locale
  • ... and 82 more: https://git.openjdk.java.net/jdk/compare/d6b5e1809bbeb31ec87a5a73f0f49de41c6fa0f7...master

Your commit was automatically rebased without conflicts.

Pushed as commit 0b5216a.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants