-
Bug
-
Resolution: Done
-
Major
-
7.9.0.GA
-
None
-
False
-
False
-
Release Notes
-
-
-
-
-
-
+
-
Undefined
-
When using Java standard serialization mechanism, we can see that ByteArrayResource is now written twice
in ByteArrayResource
@Override public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal( out ); out.writeObject( bytes ); out.writeObject(this.encoding); }
And super class writeExternal:
public void writeExternal(ObjectOutput out) throws IOException { //... out.writeObject( bytes ); }
It works as it also read twice in ByteArrayResource#readExternal and ByteArrayResource#readExternal.
Anyway, moving the bytes attribute from child class to super class in bb5e421df broke our project serialization as we rely on java serialization for our KieBase resources. Seems ok as we'll address it by some tweaking on serialVersionUID, but fixing this issue (read/write once instead of twice) will also break deserialization for projects which rely on it from 7.34.0.Final.
Don't know if it's ok to fix it in the next version. I can make a PR for this case.
- clones
-
DROOLS-5681 ByteArrayResource bytes attribute read/write twice
- Closed