8283701: Add final or sealed modifier to appropriate java.awt.color ICC_Profile API classes

Reviewed-by: bpb, aivanov, serb
This commit is contained in:
Phil Race 2022-03-30 03:00:19 +00:00
parent d06685680c
commit eb5b7128a0
3 changed files with 5 additions and 3 deletions
src/java.desktop/share/classes/java/awt/color

@ -83,7 +83,9 @@ import sun.java2d.cmm.ProfileDeferralInfo;
*
* @see ICC_ColorSpace
*/
public class ICC_Profile implements Serializable {
public sealed class ICC_Profile implements Serializable
permits ICC_ProfileGray,
ICC_ProfileRGB {
/**
* Use serialVersionUID from JDK 1.2 for interoperability.

@ -65,7 +65,7 @@ import sun.java2d.cmm.ProfileDeferralInfo;
* The inverse transform is done by converting the PCS Y components to device
* Gray via the inverse of the grayTRC.
*/
public class ICC_ProfileGray extends ICC_Profile {
public final class ICC_ProfileGray extends ICC_Profile {
/**
* Use serialVersionUID from JDK 1.2 for interoperability.

@ -80,7 +80,7 @@ import sun.java2d.cmm.ProfileDeferralInfo;
* RGB components through the inverse of the above 3x3 matrix, and then
* converting linear RGB to device RGB through inverses of the TRCs.
*/
public class ICC_ProfileRGB extends ICC_Profile {
public final class ICC_ProfileRGB extends ICC_Profile {
/**
* Use serialVersionUID from JDK 1.2 for interoperability.