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

8263894: Convert defaultPrinter and printers fields to local variables #3095

Closed
wants to merge 2 commits into from

Conversation

aivanov-jdk
Copy link
Member

@aivanov-jdk aivanov-jdk commented Mar 19, 2021

PrintServiceLookupProvider has defaultPrinter and printers fields but they are used only in getDefaultPrintService() and refreshServices() correspondingly. Thus these two fields can be converted to local variables in the corresponding methods.


Progress

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

Issue

  • JDK-8263894: Convert defaultPrinter and printers fields to local variables

Reviewers

Download

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

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

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 19, 2021

👋 Welcome back aivanov! 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 19, 2021
@openjdk
Copy link

openjdk bot commented Mar 19, 2021

@aivanov-jdk The following label will be automatically applied to this pull request:

  • 2d

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 2d client-libs-dev@openjdk.org label Mar 19, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 19, 2021

Webrevs

Copy link
Contributor

@prrace prrace left a comment

Why did you delete the comments ?

@aivanov-jdk
Copy link
Member Author

aivanov-jdk commented Mar 19, 2021

Why did you delete the comments ?

The comments highlighted the difference between what is stored in printers and in printServices: excludes vs. includes the default printer. However, according to the code, printers included the default printer too.

Now there's only printServices which contains all print services. I decided the comment didn't have much value now. Yet, upon thinking about it, the comment for printServices still provides additional insight: the array also contains the defaultPrintService.

prrace
prrace approved these changes Mar 19, 2021
@openjdk
Copy link

openjdk bot commented Mar 19, 2021

@aivanov-jdk 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:

8263894: Convert defaultPrinter and printers fields to local variables

Reviewed-by: prr, azvegint, kizune

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 15 new commits pushed to the master branch:

  • 118a49f: 8263846: Bad JNI lookup getFocusOwner in accessibility code on Mac OS X
  • cb742f9: 8255255: Update Apache Santuario (XML Signature) to version 2.2.1
  • d2c137d: 8263558: Possible NULL dereference in fast path arena free if ZapResourceArea is true
  • ab66d69: 8263138: Initialization of sun.font.SunFontManager.platformFontMap is not thread safe
  • 5b8233b: 8263871: On sem_destroy() failing we should assert
  • 96e5c3f: 8263890: Broken links to Unicode.org
  • 4d9517d: 8263834: Work around gdb for HashtableEntry
  • 6fa6557: 8263825: Remove unused and commented out member from NTLMException
  • 77ebc11: 8263892: More modifier order fixes in java.base
  • 80d3ea0: 8263885: Use the blessed modifier order in java.sql/rowset/transation.xa
  • ... and 5 more: https://git.openjdk.java.net/jdk/compare/d41f75120ddbce4573a3fda1a7085941a61387f3...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 19, 2021
@aivanov-jdk
Copy link
Member Author

aivanov-jdk commented Mar 22, 2021

/integrate

@openjdk openjdk bot closed this Mar 22, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 22, 2021
@openjdk
Copy link

openjdk bot commented Mar 22, 2021

@aivanov-jdk Since your change was applied there have been 25 commits pushed to the master branch:

  • ba504fc: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll
  • 0abbfb2: 8263729: [test] divert spurious output away from stream under test in ProcessBuilder Basic test
  • 6c2220e: 8263861: Shenandoah: Remove unused member in ShenandoahGCStateResetter
  • 5262d95: 8263855: Use the blessed modifier order in java.management/naming
  • 6f1bcb0: 8263593: Fix multiple typos in hsdis README
  • a9d2267: 8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*)
  • 42104e5: 8263488: Verify CWarningWindow works with metal rendering pipeline
  • 5a7f22a: 8263579: ZGC: Concurrent mark hangs with debug loglevel
  • 35cd945: 8263908: Build fails due to initialize_static_field_for_dump defined but not used after JDK-8263771
  • cd45538: 8263771: Refactor javaClasses initialization code to isolate dumping code
  • ... and 15 more: https://git.openjdk.java.net/jdk/compare/d41f75120ddbce4573a3fda1a7085941a61387f3...master

Your commit was automatically rebased without conflicts.

Pushed as commit 840ab7b.

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

@aivanov-jdk aivanov-jdk deleted the JDK-8263894 branch Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2d client-libs-dev@openjdk.org integrated Pull request has been integrated
4 participants