]
Manik Surtani updated JBCACHE-1382:
-----------------------------------
Fix Version/s: 2.2.1.CR2
Investigate use of ExposedBAOS instead of BAOS when marshalling
objects
-----------------------------------------------------------------------
Key: JBCACHE-1382
URL:
https://jira.jboss.org/jira/browse/JBCACHE-1382
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Manik Surtani
Assignee: Manik Surtani
Fix For: 2.2.1.CR2, 2.2.1.GA, 3.0.0.ALPHA2, 3.0.0.GA
From Bela's email:
"At least in AbstractMarshaller:
public byte[] objectToByteBuffer(Object obj) throws Exception
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream out = ObjectSerializationFactory.createObjectOutputStream(baos);
objectToObjectStream(obj, out);
out.close();
return baos.toByteArray();
}
Here, an ExposedByteArrayOutputStream instead of a BAOS would prevent the COPY of the
byte buffer. We also don't need to be concerned about reentrancy as the output streams
are local (stack) variables...
Maybe you guys should take a look at all occurrences of BAOS !"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: