[OpenJDK 2D-Dev] RFR: 8261200: Some code in the ICC_Profile may not close file streams properly [v2]
Sergey Bylokhov
serb at openjdk.java.net
Sat Feb 6 02:11:18 UTC 2021
On Sat, 6 Feb 2021 01:23:54 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
>> Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>>
>> - Update WriteProfileToFile.java
>> - Merge branch 'master' into JDK-8261200
>> - Update ICC_Profile.java
>> - Update ICC_Profile.java
>> - Initial fix
>
> test/jdk/java/awt/color/ICC_Profile/WriteProfileToFile.java line 83:
>
>> 81: }
>> 82: }
>> 83: }
>
> Just a matter of taste, but if you OK with not elaborating why arrays differs, the method may be shortened with `Arrays.equals()` usage.
updated
> test/jdk/java/awt/color/ICC_Profile/WriteProfileToFile.java line 43:
>
>> 41: testViaDataArray(gold);
>> 42: testViaFile(gold);
>> 43: testViaStream(gold);
>
> Are we OK with not calling `testViaFile()` and `testViaStream` in case of `testViaDataArray()` failure?
yeah, it intentionally "fails fast".
-------------
PR: https://git.openjdk.java.net/jdk/pull/2421
More information about the 2d-dev
mailing list