Dhairya-007 commented on code in PR #29569:
URL: https://github.com/apache/camel/pull/29569#discussion_r4526141950
##########
components/camel-mail/src/main/java/org/apache/camel/component/mail/NowSearchTerm.java:
##########
@@ -30,7 +30,6 @@
public class NowSearchTerm extends ComparisonTerm {
private static final long serialVersionUID = 1L;
Review Comment:
Applied, thanks — bumped to `2L`.
One correction on the mechanism, since it argues *for* the bump rather than
against it: with the `serialVersionUID` left at `1L`, an old stream would not
throw. `InvalidClassException` is raised on a UID mismatch, and removing a
field is a compatible change under Java's serialization rules — the value in
the stream for the now-absent subclass field is simply discarded, while the
inherited `ComparisonTerm.comparison` is read as the `0` that old instances
always wrote. So an old stream would deserialize into a term whose comparison
silently became `0`, which is exactly the kind of quiet corruption worth
refusing, so `2L` is the right call.
--
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]