rzanner commented on code in PR #430:
URL: https://github.com/apache/commons-beanutils/pull/430#discussion_r3665660762
##########
src/main/java/org/apache/commons/beanutils/DynaProperty.java:
##########
@@ -333,11 +334,13 @@ private void writeAnyClass(final Class<?> clazz, final
ObjectOutputStream out) t
* @throws IOException if I/O errors occur while writing to the underlying
stream.
*/
private void writeObject(final ObjectOutputStream out) throws IOException {
- writeAnyClass(this.type,out);
+ // write out default
+ out.defaultWriteObject();
+
+ // write custom values
+ writeAnyClass(this.type, out);
if (isMapped() || isIndexed()) {
- writeAnyClass(this.contentType,out);
+ writeAnyClass(this.contentType, out);
}
- // write out other values
- out.defaultWriteObject();
}
Review Comment:
writeObject() wouldn't need to be adapted, as we want to write the new
format always.
However, I'll just bump serialVersionUID, as supporting both serialization
strategies is non-trivial to impossible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]