[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFie
From: |
Mark Wielaard |
Subject: |
Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields |
Date: |
Sun, 11 Dec 2005 17:52:47 +0100 |
Hi Guilhem,
On Sun, 2005-12-11 at 16:41 +0100, Guilhem Lavaux wrote:
> > Why not do similar and throw the InvalidClassException from
> > ObjectStreamClass.lookup()?
> > (But then document that clearly in our version of course.)
>
> Because we would not have the same API. ObjectStreamClass.lookup may not
> throw any exception (except the default ones like Error, NPE, ...).
O man, it is a checked exception... How ugly.
I see why you don't want to do that.
> > If you do like in your patch then at least document this behavior. It is
> > slightly confusing that ObjectStreamClass.lookup() returns a non-null
> > result, but getFields() suddenly returns an empty ObjectStreamField
> > array as if there are no Serializable fields. Now user code has no real
> > way to check whether that is because the ObjectStreamClass is invalid
> > (because of bogus serialPersistentFields) or because it just has no
> > serializable fields.
>
> Ok. I may add some documentation on that.
One other suggestion. Might it make sense to do the caching, comparing
and sorting in getSerialPersistentFields()? As it is done now we seem to
copy and sort this array a lot of times.
Cheers,
Mark
signature.asc
Description: This is a digitally signed message part
- [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/10
- Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Mark Wielaard, 2005/12/11
- Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/11
- Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields,
Mark Wielaard <=
- Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/11
- [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Stuart Ballard, 2005/12/11
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Archie Cobbs, 2005/12/11
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/11
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Stuart Ballard, 2005/12/12
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Mark Wielaard, 2005/12/12
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/14
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Mark Wielaard, 2005/12/17
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Robert Schuster, 2005/12/12