Hi, Brian,
      You're right. Exception will be thrown if field is null, I mean to put a mapping 
between local field name and serialized field name, e.g, in writeObject():
           ... ...
           oFields.put("message", "detailMessage", message);
           That means that a local field message will be serialized into the name of 
"detailMessage", then the serialized stream could be accessed by JDK like we've 
supposed.
           And of course, we will deal with it in readObject():
          ... ...
           oFields.get("message", "detailMessage", (String)null);

      It's just a suggestion for considering.

Best regards...
Gansha  

>>       So I wonder if here we could add some mapping mechanisms to map real field 
>names 
>> to serialized strings, e.g: add a member function like:
>> 
>>      public void put (String field_name, String serialized_name, Object value)
>>        throws IOException, IllegalArgumentException
>>        Let Throwable be wise about the mapping when doing stuff in 
>readObject/writeObject.
>>  I wonder if it will bring more issues in ObjectInputStream.

> Is this all to say that ObjectStreamClass.getField (String) can return
> null, such that the line 

> objs[field.getOffset ()] = value;

> throws an exception?

> I don't understand the mapping problem you're talking about.

> Brian

_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to