[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 6211198: ICC_Profile.getInstance(byte[]): IAE is not specified
From:       Sergey Bylokhov <serb () openjdk ! java ! net>
Date:       2021-01-31 11:58:57
Message-ID: NmZTlBcn8BqQ9T_rx5r36SBiXBYv4P0jPoIHEDRE5j4=.62a37745-78dd-439f-92d2-6733529943ea () github ! com
[Download RAW message or body]

On Sun, 31 Jan 2021 01:41:55 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:

> The specification of the java.awt.color.ICC_Profile.getInstance(byte[]) is updated.
> Its implementation changed over time, and different exceptions were thrown, but \
> since JDK-8013430 always throws an IllegalArgumentException on null and invalid \
> data.

src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 967:

> 965:      *         Profile data
> 966:      */
> 967:     public static ICC_Profile getInstance(InputStream s) throws IOException {

This additional check was needed when the getInstance(byte[]) thrown NPE on null

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

PR: https://git.openjdk.java.net/jdk/pull/2328


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic