Scott what is the deal with this? Can I make this change?

-dain

On Monday, March 3, 2003, at 04:16 AM, Alex Loubyansky wrote:

MarshalledValue's constructor is
public MarshalledValue(Object obj) throws IOException
{
baos = new ByteArrayOutputStream();
MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(baos);
mvos.writeObject(obj);
mvos.flush();


      isHashComputed = false;
   }

Here is get():
   public Object get() throws IOException, ClassNotFoundException
   {
      if (serializedForm == null)
         return null;

ByteArrayInputStream bais = new ByteArrayInputStream(serializedForm);
MarshalledValueInputStream mvis = new MarshalledValueInputStream(bais);
return mvis.readObject();
}


Should the constructor include the line
serializedForm = baos.toByteArray(); ?

searializedForm is initialized only in readExternal(). Thus, for
instances constructed with 'new MarshalledValue(obj)' all the methods
except for readExternal/writeExternal are broken.

Or am I missing something?

PS: this is for all MarshalledValue's in invocation.*, aop.* and
interception.*.

Thanks,
alex




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to