On Wed, 1 Apr 2026 01:35:06 GMT, Sergey Bylokhov <[email protected]> wrote:
> Possibly discussed before, but I missed why we do not want to update > DataBuffer class as well, to ensure any subclasses are validated? Should `DataBuffer` be a **sealed** class? If not, the constructors of `DataBuffer` have to validate the parameters because it's possible to pass parameters that break the invariants. Currently, neither `dataType` nor `size` parameters are validated. https://github.com/openjdk/jdk/blob/88bd42d0350c126581b740bc9044aebcdb0138da/src/java.desktop/share/classes/java/awt/image/DataBuffer.java#L147-L153 ------------- PR Comment: https://git.openjdk.org/jdk/pull/29766#issuecomment-4226416029
