On Tue, Jun 11, 2024 at 11:38 AM Alan Bateman <alan.bate...@oracle.com>
wrote:

>
>
> On 11/06/2024 17:27, David Lloyd wrote:
>
> :
>
> Yes, all of the method-access methods on ReflectionFactory are used, not
> just for readObject/writeObject but also readObjectNoData, readResolve, and
> writeReplace, the constructor accessors, and the factory methods for
> OptionalDataException. We don't use the static initializer one though
> (maybe the ORB does, I'm not sure).
>
> Okay, next question is whether you are also using Unsafe to access the
> fields of classes where you've got a MH to invoke the readXXX/writeXXX
> methods? Ignore SVUID for the moment.
>

For "normal" objects, no; we invoke readXXX/writeXXX if they're available
with our OIS/OOS proxy object. We are using Unsafe to initialize the
handler of reflection proxy instances though, on the deserialization side,
and similarly for certain fields of some "known" classes for optimization
purposes, though if these classes had readXXX/writeXXX we could probably do
that another way (albeit at a performance penalty, in all likelihood).

-- 
- DML • he/him

Reply via email to