Re: [OpenJDK 2D-Dev] RFR: 8264666: Reuse Math.multiplyExact/addExact in the LCMSImageLayout class

2021-08-31 Thread Sergey Bylokhov
On Fri, 2 Apr 2021 23:02:50 GMT, Sergey Bylokhov wrote: > - The hand-crafted methods for addition and multiplication are replaced by > the "Math" versions. > - Cleanup: the usage of do/while(false) is removed not now - PR: https://git.openjdk.java.net/jdk/pull/

[OpenJDK 2D-Dev] RFR: 8273168: Remove superfluous use of boxing in java.desktop

2021-08-31 Thread Andrey Turbanov
parseInt/parseLong/parseShort/parseByte/parseFloat should be preferred, as they return primitives. While valueOf returns boxed object. - Commit messages: - [PATCH] Cleanup redundant boxing in java.desktop module Changes: https://git.openjdk.java.net/jdk/pull/5313/files Webrev: htt

Re: [OpenJDK 2D-Dev] RFR: 8273102: Delete deprecated for removal the empty finalize() in java.desktop module

2021-08-31 Thread Pankaj Bansal
On Sun, 29 Aug 2021 01:09:36 GMT, Sergey Bylokhov wrote: > The "java.desktop" module has a few implementations of the finalize() which > do nothing, deprecated since jdk9, and are marked "forRemoval = true" since > jdk16. > > This is a request to delete such empty methods. > > CSR: https://

Re: [OpenJDK 2D-Dev] RFR: 8273140: Replace usages of Enum.class.getEnumConstants() with Enum.values() where possible [v3]

2021-08-31 Thread Сергей Цыпанов
On Mon, 30 Aug 2021 19:28:11 GMT, Kevin Rushforth wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8273140: Fix copyright year > > src/java.desktop/share/classes/sun/font/EAttribute.java line 2: > >> 1: /* >> 2:

Re: [OpenJDK 2D-Dev] RFR: 8273140: Replace usages of Enum.class.getEnumConstants() with Enum.values() where possible [v4]

2021-08-31 Thread Сергей Цыпанов
> Just a very tiny clean-up. > > There are some places in JDK code base where we call > `Enum.class.getEnumConstants()` to get all the values of the referenced > `enum`. This is excessive, less-readable and slower than just calling > `Enum.values()` as in `getEnumConstants()` we have volatile a

Re: [OpenJDK 2D-Dev] RFR: 8272805: Avoid looking up standard charsets [v4]

2021-08-31 Thread Sergey Bylokhov
> This is the continuation of JDK-8233884, JDK-8271456, and JDK-8272120. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be done more efficiently(up to x20 time faster) with use of > java.nio.charset.StandardCharse