When using Java standard serialization mechanism, we can see that ByteArrayResource is now written twice
And super class writeExternal:
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.