Re: RFR: 8300929: Avoid unnecessary array fill after creation in java.awt.image [v2]

2023-01-26 Thread Attila Szegedi
On Thu, 26 Jan 2023 09:28:48 GMT, Andrey Turbanov wrote: >> No need to fill elements of array with default values if it was just >> created. Java guarantees that all elements of numeric array have default >> values after allocations - 0. > > Andrey Turbanov has updated the pull request

Re: RFR: 8300929: Avoid unnecessary array fill after creation in java.awt.image

2023-01-24 Thread Attila Szegedi
On Tue, 24 Jan 2023 16:25:46 GMT, Sergey Bylokhov wrote: >> No need to fill elements of array with default values if it was just >> created. Java guarantees that all elements of numeric array have default >> values after allocations - 0. > >

Re: RFR: 8300929: Avoid unnecessary array fill after creation in java.awt.image

2023-01-24 Thread Attila Szegedi
On Mon, 23 Jan 2023 17:20:41 GMT, Andrey Turbanov wrote: > No need to fill elements of array with default values if it was just created. > Java guarantees that all elements of numeric array have default values after > allocations - 0. Marked as reviewed by attila (Reviewer). -

Re: RFR: 8287603: Avoid redundant HashMap.containsKey calls in NimbusDefaults.getDerivedColor

2022-07-03 Thread Attila Szegedi
On Sat, 30 Apr 2022 09:33:38 GMT, Andrey Turbanov wrote: > The method > `javax.swing.plaf.nimbus.NimbusDefaults#getDerivedColor(String,String,float,float,float,int,boolean)` > could be improved by usage of Map.putIfAbsent instead of separate > `containsKey`/`get`/`put` calls. We known that