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

Reply via email to