Re: [OpenJDK 2D-Dev] RFR: 8263894: Convert defaultPrinter and printers fields to local variables [v2]

2021-03-20 Thread Alexander Zuev
On Fri, 19 Mar 2021 21:28:54 GMT, Alexey Ivanov  wrote:

>> `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.
>
> Alexey Ivanov has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Bring back the comment for printServices

Marked as reviewed by kizune (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/3095


Re: [OpenJDK 2D-Dev] RFR: 8263894: Convert defaultPrinter and printers fields to local variables [v2]

2021-03-19 Thread Alexander Zvegintsev
On Fri, 19 Mar 2021 21:28:54 GMT, Alexey Ivanov  wrote:

>> `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.
>
> Alexey Ivanov has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Bring back the comment for printServices

Marked as reviewed by azvegint (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/3095


Re: [OpenJDK 2D-Dev] RFR: 8263894: Convert defaultPrinter and printers fields to local variables [v2]

2021-03-19 Thread Phil Race
On Fri, 19 Mar 2021 21:28:54 GMT, Alexey Ivanov  wrote:

>> `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.
>
> Alexey Ivanov has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Bring back the comment for printServices

Marked as reviewed by prr (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/3095


Re: [OpenJDK 2D-Dev] RFR: 8263894: Convert defaultPrinter and printers fields to local variables [v2]

2021-03-19 Thread Alexey Ivanov
On Fri, 19 Mar 2021 21:05:57 GMT, Phil Race  wrote:

> 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`.

-

PR: https://git.openjdk.java.net/jdk/pull/3095


Re: [OpenJDK 2D-Dev] RFR: 8263894: Convert defaultPrinter and printers fields to local variables [v2]

2021-03-19 Thread Alexey Ivanov
> `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.

Alexey Ivanov has updated the pull request incrementally with one additional 
commit since the last revision:

  Bring back the comment for printServices

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3095/files
  - new: https://git.openjdk.java.net/jdk/pull/3095/files/cfe460c2..2b98fec2

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=3095=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=3095=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3095.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3095/head:pull/3095

PR: https://git.openjdk.java.net/jdk/pull/3095