8283703: Add sealed modifier to java.awt.geom.Path2D

Reviewed-by: bpb, kizune, aivanov
This commit is contained in:
Phil Race 2022-04-04 21:20:12 +00:00
parent 0cd46f655a
commit 86caf606ff

View File

@ -70,7 +70,9 @@ import sun.awt.geom.Curve;
* @author Jim Graham
* @since 1.6
*/
public abstract class Path2D implements Shape, Cloneable {
public abstract sealed class Path2D implements Shape, Cloneable
permits Path2D.Double,
Path2D.Float {
/**
* An even-odd winding rule for determining the interior of
* a path.
@ -191,7 +193,7 @@ public abstract class Path2D implements Shape, Cloneable {
*
* @since 1.6
*/
public static class Float extends Path2D implements Serializable {
public static non-sealed class Float extends Path2D implements Serializable {
transient float[] floatCoords;
/**
@ -1093,7 +1095,7 @@ public abstract class Path2D implements Shape, Cloneable {
*
* @since 1.6
*/
public static class Double extends Path2D implements Serializable {
public static non-sealed class Double extends Path2D implements Serializable {
transient double[] doubleCoords;
/**