Skip to main content

Huge number of int arrays during deserialization.

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2013-11-20

We see that there are huge number of int array instances during deserialization. We understand that this is due to creation of dependency tracking objects ($HandleTable$HandleList) created. As I understand, they are used to propagate ClassNotFoundException to "dependent" objects while reading an object.

I fail to understand the need to track this dependency of ClassNotFoundException over a target object? Why can't the implementation throw the exception right away, if the ClassNotFoundException is found?

I do realize that HandleTable's "entries" are absolutely required to wire any previously read objects into dependent objects read later from the stream. Just to clarify, question is about significance of$HandleTable$HandleList, which I fail to understand.

Any insight is greatly appreciated.