RFR: 8298240: Replace the usage of ImageLayoutException by the CMMException

SWinxy duke at openjdk.org
Wed Dec 7 20:38:09 UTC 2022


On Wed, 7 Dec 2022 04:07:45 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> ImageLayoutException is used to report any issues with image layout calculation. But since we cannot throw the unspecified exception to the application, all usages of ImageLayoutException are wrapped by the CMMException. And now if such CMMException occurs we have lost at what point the initial exception was raised.
> 
> We can pass some additional data around, but it looks like we can just delete the ImageLayoutException and use CMMException instead. 
> 
> Additionally:
>  * The `public` keyword is removed in a few places if not needed.
>  * The PT_XX flags are updated to make it clearly visible how they are related.

In another PR, CMMException should have its documentation updated. It currently says `This exception is thrown if the native CMM returns an error.` But we are also throwing it with checks in Java.

-------------

Marked as reviewed by SWinxy at github.com (no known OpenJDK username).

PR: https://git.openjdk.org/jdk/pull/11552



More information about the client-libs-dev mailing list