Integrated: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-02 Thread Glavo
n Issue on JBS for me? This pull request has now been integrated. Changeset: fa4884c3 Author:Glavo Committer: Nir Lisker URL: https://git.openjdk.org/jfx/commit/fa4884c3c43c43da8dd555441ca5658898e807cb Stats: 61 lines in 3 files changed: 3 ins; 38 del; 20 mod 8301604: Replace Collect

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of [v3]

2023-02-01 Thread Nir Lisker
On Wed, 1 Feb 2023 23:50:07 GMT, Glavo wrote: >> `List.of` is cleaner, and can slightly reduce the memory footprint for lists >> of one or two elements. >> >> Because `List.of` can only store non-null elements, I have only replaced a >> few usage. >> >> Can someone open an Issue on JBS for me

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of [v3]

2023-02-01 Thread Glavo
> `List.of` is cleaner, and can slightly reduce the memory footprint for lists > of one or two elements. > > Because `List.of` can only store non-null elements, I have only replaced a > few usage. > > Can someone open an Issue on JBS for me? Glavo has updated the pull request incrementally wit

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of [v2]

2023-02-01 Thread Nir Lisker
On Wed, 1 Feb 2023 23:38:57 GMT, Glavo wrote: >> `List.of` is cleaner, and can slightly reduce the memory footprint for lists >> of one or two elements. >> >> Because `List.of` can only store non-null elements, I have only replaced a >> few usage. >> >> Can someone open an Issue on JBS for me

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of [v2]

2023-02-01 Thread Glavo
> `List.of` is cleaner, and can slightly reduce the memory footprint for lists > of one or two elements. > > Because `List.of` can only store non-null elements, I have only replaced a > few usage. > > Can someone open an Issue on JBS for me? Glavo has updated the pull request incrementally wit

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Nir Lisker
On Wed, 1 Feb 2023 16:54:30 GMT, John Hendrikx wrote: >> modules/javafx.media/src/main/java/com/sun/media/jfxmedia/Media.java line >> 103: >> >>> 101: } >>> 102: } >>> 103: return returnValue; >> >> This method can be reduced to >> >> public List getTracks() {

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Nir Lisker
On Wed, 1 Feb 2023 15:11:57 GMT, Glavo wrote: > I have considered this, but I didn't make this change because I was worried > that there would be less descriptive information when null was encountered. I think it's fine. The method is documented to throw and it happens immediately on entry. NP

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread John Hendrikx
On Wed, 1 Feb 2023 14:36:51 GMT, Nir Lisker wrote: >> `List.of` is cleaner, and can slightly reduce the memory footprint for lists >> of one or two elements. >> >> Because `List.of` can only store non-null elements, I have only replaced a >> few usage. >> >> Can someone open an Issue on JBS f

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Glavo
On Thu, 26 Jan 2023 05:30:56 GMT, Glavo wrote: > `List.of` is cleaner, and can slightly reduce the memory footprint for lists > of one or two elements. > > Because `List.of` can only store non-null elements, I have only replaced a > few usage. > > Can someone open an Issue on JBS for me? > #

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Nir Lisker
On Thu, 26 Jan 2023 05:30:56 GMT, Glavo wrote: > `List.of` is cleaner, and can slightly reduce the memory footprint for lists > of one or two elements. > > Because `List.of` can only store non-null elements, I have only replaced a > few usage. > > Can someone open an Issue on JBS for me? ###

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Nir Lisker
On Wed, 1 Feb 2023 11:21:04 GMT, Glavo wrote: >> Filed: https://bugs.openjdk.org/browse/JDK-8301604. Please let me know if >> the issue is not reported correctly. > > @theaoqi Thank you very much! @Glavo If you can't access JBS, you can submit a report via bugreport.java.com. @theaoqi If you cr

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Kevin Rushforth
On Thu, 26 Jan 2023 05:30:56 GMT, Glavo wrote: > `List.of` is cleaner, and can slightly reduce the memory footprint for lists > of one or two elements. > > Because `List.of` can only store non-null elements, I have only replaced a > few usage. > > Can someone open an Issue on JBS for me? For

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Glavo
On Wed, 1 Feb 2023 11:03:32 GMT, Ao Qi wrote: >> `List.of` is cleaner, and can slightly reduce the memory footprint for lists >> of one or two elements. >> >> Because `List.of` can only store non-null elements, I have only replaced a >> few usage. >> >> Can someone open an Issue on JBS for me

RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Glavo
`List.of` is cleaner, and can slightly reduce the memory footprint for lists of one or two elements. Because `List.of` can only store non-null elements, I have only replaced a few usage. Can someone open an Issue on JBS for me? - Commit messages: - cleanup Changes: https://git.o

Re: RFR: 8301604: Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Ao Qi
On Thu, 26 Jan 2023 05:30:56 GMT, Glavo wrote: > `List.of` is cleaner, and can slightly reduce the memory footprint for lists > of one or two elements. > > Because `List.of` can only store non-null elements, I have only replaced a > few usage. > > Can someone open an Issue on JBS for me? Fil

Replace Collections.unmodifiableList with List.of

2023-02-01 Thread Glavo
I opened a PR to clean up the code. Can someone help me open an Issue in JBS? https://github.com/openjdk/jfx/pull/1012 With best regards, Glavo