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

2021-04-07 Thread Sergey Bylokhov
- The hand-crafted methods for addition and multiplication are replaced by the "Math" versions. - Cleanup: the usage of do/while(false) is removed - Commit messages: - delete "do{...} while (false);" - safeXX -> xxExact Changes: https://git.openjdk.java.net/jdk/pull//files We

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

2021-04-07 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 The nice PR number: ! src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImag

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

2021-04-07 Thread Phil Race
On Fri, 2 Apr 2021 23:06:43 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 > > The nice PR number: ! I don't understand the exception handling here. multi

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

2021-04-07 Thread Alexander Zvegintsev
On Sun, 4 Apr 2021 07:58:44 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 > > src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java line >

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

2021-04-07 Thread Sergey Bylokhov
On Wed, 7 Apr 2021 20:14:06 GMT, Phil Race wrote: > I don't understand the exception handling here. multiplyExact and addExact > will throw a runtime exception - ArithmeticException. And I don't see where > it is caught. The change for ImageLayoutException to extend > ArithmeticException doesn

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

2021-05-05 Thread Sergey Bylokhov
On Wed, 7 Apr 2021 23:23:28 GMT, Sergey Bylokhov wrote: >> I don't understand the exception handling here. multiplyExact and addExact >> will throw a runtime exception - ArithmeticException. And I don't see where >> it is caught. The change for ImageLayoutException to extend >> ArithmeticExcep

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

2021-06-07 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/

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

2021-07-05 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/

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

2021-08-02 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/

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/