RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v4]

Volker Simonis simonis at openjdk.org
Tue May 2 18:02:45 UTC 2023


On Tue, 2 May 2023 16:59:00 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Throw StreamCorruptedException instead of InvalidClassException and handle negative array size in checkArray() as well
>
> test/jdk/java/io/ObjectInputStream/NegativeArraySizeTest.java line 106:
> 
>> 104: 
>> 105:     public static void main(String[] args) throws Exception {
>> 106:         try {
> 
> Test code nits, we can probably `try-with-resources` this thing to make it cleaner and make sure nothing unexpectedly bad is happening on "close" paths.

OK, here we go...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13540#discussion_r1182871096


More information about the core-libs-dev mailing list