[
https://issues.apache.org/jira/browse/YOKO-434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Jencks updated YOKO-434:
------------------------------
Attachment: YOKO-434-test.diff
rev 1152937 commits an unpleasant solution for this. This attachment is a unit
test for deserializing various GIOP messages. Since it requires significant
modification to yoko to allow access to internals, it should not be comitted in
its current form.
> When reading a value object from a GIOP stream, yoko does not determine if a
> source value object class had a writeObject method, it uses the target value
> object class.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: YOKO-434
> URL: https://issues.apache.org/jira/browse/YOKO-434
> Project: Yoko - CORBA Server
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: orb core
> Affects Versions: v1.1.0
> Reporter: David Jencks
> Assignee: David Jencks
> Attachments: YOKO-434-test.diff
>
>
> When a value object is serialized into a GIOP message, the existence of a
> writeObject method on the source value object class determines whether 2
> bytes (stream format version and whether defaultWriteFields were called) are
> written to the output stream, and the value object fields start at the next 4
> byte boundary. However when the value object is read in, the existence of a
> writeObject method on the target class is used to determine whether to expect
> these 2 bytes. There is no reason to expect that these writeObject methods'
> existence will be the same on the source and target classes. For instance
> the oracle BitSet class has a writeObject method but the Harmony and IBM jdk
> BitSet classes do not.
> I have not yet found a way to determine from the stream whether the source
> class had a writeObject method other than trying both possibilities and
> picking the first result that works. This requires adding mark capabilities
> to the yoko InputStream.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira