On Sun, Jun 14, 2020 at 12:58 PM Rob Spoor <apa...@icemanx.nl> wrote:

> On 14/06/2020 15:41, Gary Gregory wrote:
> > In order to avoid posting the same answer here and on GitHib over and
> over,
> > I tried to explain BC here:
> >
> https://garygregory.wordpress.com/2020/06/14/how-we-handle-binary-compatibility-at-apache-commons/
> >
> > Feedback is most welcome.
> >
> > Gary
>
> You mention that adding fields is fine. That's true for binary
> compatibility, but it could cause serialization incompatibility. For
> instance, if you add a primitive field, trying to deserialize an
> existing blob will set the value to the default value of 0. That could
> cause code to break. It's why I made the "end" field of
> CharSequenceReader Integer instead of int; see
>
> https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/input/CharSequenceReader.java
> .
>
> Indeed, but Serialization is not part of binary compatibility.

Gary


> Rob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

Reply via email to