-
Bug
-
Resolution: Done
-
Major
-
None
-
7.43.1.Final
-
None
-
2020 Week 40-42 (from Sep 28)
-
Undefined
-
NEW
-
NEW
-
---
-
---
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.
- is cloned by
-
RHDM-1502 ByteArrayResource bytes attribute read/write twice
- Closed